// constructor
SGSoundSample::SGSoundSample( const char *path, const char *file,
bool cleanup ) :
+ data(NULL),
pitch(1.0),
volume(1.0),
loop(AL_FALSE)
// constructor
SGSoundSample::SGSoundSample( unsigned char *_data, int len, int _freq ) :
+ data(NULL),
pitch(1.0),
volume(1.0),
loop(AL_FALSE)
SGSoundSample::~SGSoundSample() {
SG_LOG( SG_GENERAL, SG_INFO, "Deleting a sample" );
if ( data != NULL ) {
- delete data;
+ free(data);
}
alDeleteSources(1, &source);
alDeleteBuffers(1, &buffer);