audio: Fixed SDL_AudioStreamGet() function parameters.

There was a draft of this where it did audio conversion into the final buffer,
if there was enough room available past what you asked for, but that interface
got removed, so the parameters didn't make sense (and we were using the
wrong one in any case, too!).
This commit is contained in:
Ryan C. Gordon
2017-01-06 01:02:58 -05:00
parent 99fc1ef994
commit 992124d4de
6 changed files with 9 additions and 9 deletions

View File

@@ -77,7 +77,7 @@ HandleAudioProcess(_THIS)
}
}
got = SDL_AudioStreamGet(this->stream, this->spec.size, this->fake_stream, this->spec.size);
got = SDL_AudioStreamGet(this->stream, this->fake_stream, this->spec.size);
SDL_assert((got < 0) || (got == this->spec.size));
if (got != this->spec.size) {
SDL_memset(this->fake_stream, this->spec.silence, this->spec.size);
@@ -130,7 +130,7 @@ HandleCaptureProcess(_THIS)
}
while (SDL_AudioStreamAvailable(this->stream) >= stream_len) {
const int got = SDL_AudioStreamGet(this->stream, stream_len, this->fake_stream, stream_len);
const int got = SDL_AudioStreamGet(this->stream, this->fake_stream, stream_len);
SDL_assert((got < 0) || (got == stream_len));
if (got != stream_len) {
SDL_memset(this->fake_stream, this->callbackspec.silence, stream_len);