From 748f46054faf2379a002e045121e0f889da7d4ff Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Fri, 6 Jan 2017 03:38:14 -0500 Subject: [PATCH] audio: Add an assert to make sure non-streaming audio uses good buffer sizes. --- src/audio/SDL_audio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/audio/SDL_audio.c b/src/audio/SDL_audio.c index 4dc3cf2c4..7e874e193 100644 --- a/src/audio/SDL_audio.c +++ b/src/audio/SDL_audio.c @@ -565,6 +565,7 @@ SDL_RunAudio(void *devicep) while (!SDL_AtomicGet(&device->shutdown)) { /* Fill the current buffer with sound */ if (!device->stream && SDL_AtomicGet(&device->enabled)) { + SDL_assert(device->spec.size == device->callbackspec.size); stream = current_audio.impl.GetDeviceBuf(device); } else { /* if the device isn't enabled, we still write to the