Let the application free the buffer data.
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user