mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-22 03:08:22 +00:00
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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user