mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-20 22:16:49 +01:00
audio: Add an assert to make sure non-streaming audio uses good buffer sizes.
This commit is contained in:
parent
356c2eadf4
commit
748f46054f
@ -565,6 +565,7 @@ SDL_RunAudio(void *devicep)
|
|||||||
while (!SDL_AtomicGet(&device->shutdown)) {
|
while (!SDL_AtomicGet(&device->shutdown)) {
|
||||||
/* Fill the current buffer with sound */
|
/* Fill the current buffer with sound */
|
||||||
if (!device->stream && SDL_AtomicGet(&device->enabled)) {
|
if (!device->stream && SDL_AtomicGet(&device->enabled)) {
|
||||||
|
SDL_assert(device->spec.size == device->callbackspec.size);
|
||||||
stream = current_audio.impl.GetDeviceBuf(device);
|
stream = current_audio.impl.GetDeviceBuf(device);
|
||||||
} else {
|
} else {
|
||||||
/* if the device isn't enabled, we still write to the
|
/* if the device isn't enabled, we still write to the
|
||||||
|
Loading…
Reference in New Issue
Block a user