SHARE
TWEET

Untitled

a guest May 15th, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void load_and_initialize_samples()
  2. {
  3.   total_samples = 27;
  4.   samples = (Sample *) malloc(sizeof(Sample) * total_samples);
  5.  
  6.   for(int i = 0; i < total_samples; i++) {
  7.     samples[i].components = (unsigned int *) malloc(sizeof(unsigned int) * TOTAL_COMPONENTS);
  8.   }
  9.  
  10.   samples[0].components[0] = 3;
  11.   samples[0].components[1] = 255;
  12.   samples[0].components[2] = 0;
  13.  
  14.   samples[1].components[0] = 0;
  15.   samples[1].components[1] = 247;
  16.   samples[1].components[2] = 3;
  17. // ...
  18.   samples[26].components[0] = 5;
  19.   samples[26].components[1] = 3;
  20.   samples[26].components[2] = 234;
  21. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top