From 2af37b484ec146346dd848b5d0ba5fa74e307411 Mon Sep 17 00:00:00 2001 From: ehofman Date: Sat, 12 Nov 2005 12:22:23 +0000 Subject: [PATCH] Let the application free the buffer data. --- simgear/sound/sample_openal.cxx | 2 -- simgear/sound/sample_openal.hxx | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) 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 -- 2.39.5