From 300ac12e3f220265fdd4685efb8e75e9da0ef3cd Mon Sep 17 00:00:00 2001 From: sudden6 Date: Sun, 19 Mar 2017 14:13:48 +0100 Subject: [PATCH] fix: silence warning by not using dynamic arrays on stack --- src/audio/audio.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/audio/audio.cpp b/src/audio/audio.cpp index 3287f8d42..71c588597 100644 --- a/src/audio/audio.cpp +++ b/src/audio/audio.cpp @@ -487,10 +487,11 @@ void Audio::playAudioBuffer(ALuint alSource, const int16_t* data, int samples, u alSourcei(alSource, AL_LOOPING, AL_FALSE); if (processed) { - ALuint bufids[processed]; + ALuint* bufids = new ALuint[processed]; alSourceUnqueueBuffers(alSource, processed, bufids); alDeleteBuffers(processed - 1, bufids + 1); bufid = bufids[0]; + delete[] bufids; } else if (queued < 16) { alGenBuffers(1, &bufid); } else {