mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
audio: Fix memory leak in OpenAL
This commit is contained in:
parent
fb6c92cf08
commit
8a7b47d501
@ -443,6 +443,7 @@ get_sound_data(MovieAudio *movie, int mode) {
|
||||
alBufferData(sd->_sample,
|
||||
(channels>1) ? AL_FORMAT_STEREO16 : AL_FORMAT_MONO16,
|
||||
data, samples * channels * 2, stream->audio_rate());
|
||||
delete[] data;
|
||||
int err = alGetError();
|
||||
if (err != AL_NO_ERROR) {
|
||||
audio_error("could not fill OpenAL buffer object with data");
|
||||
|
Loading…
x
Reference in New Issue
Block a user