]> git.mxchange.org Git - simgear.git/blobdiff - simgear/sound/sample_openal.cxx
Let the application free the buffer data.
[simgear.git] / simgear / sound / sample_openal.cxx
index 124ad93904d64497db156ce88877b42064d0177e..6f913bd881f062b316496209de0ca4b2ac36e710 100644 (file)
@@ -125,7 +125,7 @@ SGSoundSample::SGSoundSample( const char *path, const char *file) :
         //
        // pre 1.0 alut version
         //
-    ALvoid* data = load_file(path, file)
+    ALvoid* data = load_file(path, file);
 
     // Copy data to the internal OpenAL buffer
     alBufferData( buffer, format, data, size, freq );
@@ -141,8 +141,7 @@ SGSoundSample::SGSoundSample( const char *path, const char *file) :
 }
 
 // constructor
-SGSoundSample::SGSoundSample( unsigned char *_data, int len, int _freq,
-                              bool cleanup) :
+SGSoundSample::SGSoundSample( unsigned char *_data, int len, int _freq ) :
     buffer(0),
     source(0),
     pitch(1.0),
@@ -180,10 +179,6 @@ SGSoundSample::SGSoundSample( unsigned char *_data, int len, int _freq,
         throw sg_exception("Failed to buffer data.");
     }
 
-    if ( cleanup ) {
-        free(_data);
-    }
-
     print_openal_error("constructor return");
 }