]> 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 366b6105a711a1a6a53fdd88ec8a6e752f49b387..6f913bd881f062b316496209de0ca4b2ac36e710 100644 (file)
@@ -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");
 }