audio: rename fake_stream to work_buffer.

It's more than an alternative for when the OS can't provide a DMA buffer, now.
This commit is contained in:
Ryan C. Gordon
2017-01-06 01:07:34 -05:00
parent 992124d4de
commit b3e8db802e
5 changed files with 36 additions and 37 deletions

View File

@@ -69,8 +69,8 @@ FillSound(void *device, void *stream, size_t len,
const int stream_len = audio->callbackspec.size;
const int ilen = (int) len;
while (SDL_AudioStreamAvailable(audio->stream) < ilen) {
callback(audio->spec.userdata, audio->fake_stream, stream_len);
if (SDL_AudioStreamPut(audio->stream, audio->fake_stream, stream_len) == -1) {
callback(audio->spec.userdata, audio->work_buffer, stream_len);
if (SDL_AudioStreamPut(audio->stream, audio->work_buffer, stream_len) == -1) {
SDL_AudioStreamClear(audio->stream);
SDL_AtomicSet(&audio->enabled, 0);
break;