mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-25 09:17:12 +01:00
Patched to compile on C89 compilers.
This commit is contained in:
parent
4d525d465b
commit
a4249b48ee
@ -687,8 +687,9 @@ SDL_RunAudio(void *devicep)
|
|||||||
SDL_AudioStreamPut(device->stream, data, data_len);
|
SDL_AudioStreamPut(device->stream, data, data_len);
|
||||||
|
|
||||||
while (SDL_AudioStreamAvailable(device->stream) >= ((int) device->spec.size)) {
|
while (SDL_AudioStreamAvailable(device->stream) >= ((int) device->spec.size)) {
|
||||||
|
int got;
|
||||||
data = SDL_AtomicGet(&device->enabled) ? current_audio.impl.GetDeviceBuf(device) : NULL;
|
data = SDL_AtomicGet(&device->enabled) ? current_audio.impl.GetDeviceBuf(device) : NULL;
|
||||||
const int got = SDL_AudioStreamGet(device->stream, data ? data : device->work_buffer, device->spec.size);
|
got = SDL_AudioStreamGet(device->stream, data ? data : device->work_buffer, device->spec.size);
|
||||||
SDL_assert((got < 0) || (got == device->spec.size));
|
SDL_assert((got < 0) || (got == device->spec.size));
|
||||||
|
|
||||||
if (data == NULL) { /* device is having issues... */
|
if (data == NULL) { /* device is having issues... */
|
||||||
|
Loading…
Reference in New Issue
Block a user