}
// 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),
throw sg_exception("Failed to buffer data.");
}
- if ( cleanup ) {
- free(_data);
- }
+ free(_data);
print_openal_error("constructor return");
}
* @param _data Pointer to a memory buffer containing the sample data
* @param len Byte length of array
* @param _freq Frequency of the provided data (bytes per second)
- * @param cleanup Request clean up the intermediate data (this
should usually be true unless you want to manipulate the data
later.)
*/
- SGSoundSample( unsigned char *_data, int len, int _freq, bool cleanup );
+ SGSoundSample( unsigned char *_data, int len, int _freq );
~SGSoundSample();