We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6428cee commit a4ec0b1Copy full SHA for a4ec0b1
src/audio/SDL_audio.c
@@ -700,8 +700,6 @@ static int SDLCALL SDL_RunAudio(void *userdata)
700
701
/* Loop, filling the audio buffers */
702
while (!SDL_AtomicGet(&device->shutdown)) {
703
- data_len = device->callbackspec.size;
704
-
705
/* Fill the current buffer with sound */
706
if (!device->stream && SDL_AtomicGet(&device->enabled)) {
707
data = current_audio.impl.GetDeviceBuf(device);
@@ -728,6 +726,8 @@ static int SDLCALL SDL_RunAudio(void *userdata)
728
726
data = device->work_buffer;
729
727
}
730
+ data_len = device->callbackspec.size;
+
731
/* !!! FIXME: this should be LockDevice. */
732
SDL_LockMutex(device->mixer_lock);
733
if (SDL_AtomicGet(&device->paused)) {
0 commit comments