mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
fix: silence warning by not using dynamic arrays on stack
This commit is contained in:
parent
7e0bcf089f
commit
300ac12e3f
|
@ -487,10 +487,11 @@ void Audio::playAudioBuffer(ALuint alSource, const int16_t* data, int samples, u
|
||||||
alSourcei(alSource, AL_LOOPING, AL_FALSE);
|
alSourcei(alSource, AL_LOOPING, AL_FALSE);
|
||||||
|
|
||||||
if (processed) {
|
if (processed) {
|
||||||
ALuint bufids[processed];
|
ALuint* bufids = new ALuint[processed];
|
||||||
alSourceUnqueueBuffers(alSource, processed, bufids);
|
alSourceUnqueueBuffers(alSource, processed, bufids);
|
||||||
alDeleteBuffers(processed - 1, bufids + 1);
|
alDeleteBuffers(processed - 1, bufids + 1);
|
||||||
bufid = bufids[0];
|
bufid = bufids[0];
|
||||||
|
delete[] bufids;
|
||||||
} else if (queued < 16) {
|
} else if (queued < 16) {
|
||||||
alGenBuffers(1, &bufid);
|
alGenBuffers(1, &bufid);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user