From: ehofman Date: Sat, 12 Nov 2005 12:22:23 +0000 (+0000) Subject: Let the application free the buffer data. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2af37b484ec146346dd848b5d0ba5fa74e307411;p=simgear.git Let the application free the buffer data. --- diff --git a/simgear/sound/sample_openal.cxx b/simgear/sound/sample_openal.cxx index 705b4d54..6f913bd8 100644 --- a/simgear/sound/sample_openal.cxx +++ b/simgear/sound/sample_openal.cxx @@ -179,8 +179,6 @@ SGSoundSample::SGSoundSample( unsigned char *_data, int len, int _freq ) : throw sg_exception("Failed to buffer data."); } - free(_data); - print_openal_error("constructor return"); } diff --git a/simgear/sound/sample_openal.hxx b/simgear/sound/sample_openal.hxx index 905ce8a1..381164b4 100644 --- a/simgear/sound/sample_openal.hxx +++ b/simgear/sound/sample_openal.hxx @@ -115,6 +115,7 @@ public: /** * Constructor. * @param _data Pointer to a memory buffer containing the sample data + the application is responsible for freeing the buffer data. * @param len Byte length of array * @param _freq Frequency of the provided data (bytes per second) should usually be true unless you want to manipulate the data