Browse Source

audio: Add an assert to make sure non-streaming audio uses good buffer sizes.

Ryan C. Gordon 8 years ago
parent
commit
748f46054f
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/audio/SDL_audio.c

+ 1 - 0
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