e51bf28
--- apricots/sampleio.cpp	2008-08-26 12:40:09.000000000 -0500
e51bf28
+++ apricots/sampleio.cpp	2008-08-26 12:40:09.000000000 -0500
e51bf28
@@ -74,12 +74,12 @@
e51bf28
   alListenerfv(AL_ORIENTATION, front );
e51bf28
 
e51bf28
   // Load in samples
e51bf28
-  ALvoid* data = malloc(5 * (512 * 3) * 1024);
e51bf28
+  //ALvoid* data = malloc(5 * (512 * 3) * 1024);
e51bf28
   alGenBuffers(numsamples, samples);
e51bf28
 
e51bf28
   for (int i = 0; i < numsamples; i++){
e51bf28
-    ALsizei freq;
e51bf28
-    ALboolean fileok;
e51bf28
+    //ALsizei freq;
e51bf28
+    //ALboolean fileok;
e51bf28
     // Evil OpenAL portability fix done here
e51bf28
 #ifdef _WIN32
e51bf28
     ALenum format;
e51bf28
@@ -87,15 +87,17 @@
e51bf28
     alutLoadWAVFile(filenames[i],&format,&data,&filelen,&freq,&trash);
e51bf28
     fileok = (alGetError() == AL_NO_ERROR);
e51bf28
 #else
e51bf28
-    ALsizei format;
e51bf28
-    ALsizei trash;
e51bf28
-    fileok = alutLoadWAV(filenames[i],&data,&format,&filelen,&trash,&freq);
e51bf28
+    //ALsizei format;
e51bf28
+    //ALsizei trash;
e51bf28
+    //fileok = alutLoadWAV(filenames[i],&data,&format,&filelen,&trash,&freq);
e51bf28
+    samples[i] = alutCreateBufferFromFile(filenames[i]);
e51bf28
 #endif
e51bf28
-    if (!fileok){
e51bf28
+    //if (!fileok){
e51bf28
+    if (samples[i] == AL_NONE){
e51bf28
       cerr << "sampleio: could not open " << filenames[i] << endl;
e51bf28
       exit(1);
e51bf28
     }         
e51bf28
-    alBufferData(samples[i], format, data, filelen, freq);
e51bf28
+    //alBufferData(samples[i], format, data, filelen, freq);
e51bf28
   }
e51bf28
 
e51bf28
   // Generate Sources
e51bf28
@@ -107,7 +109,7 @@
e51bf28
     alSourcefv(sources[j], AL_ORIENTATION, back );
e51bf28
   }
e51bf28
   
e51bf28
-  free(data);
e51bf28
+  //free(data);
e51bf28
   
e51bf28
 }
e51bf28