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

@@ -832,7 +832,7 @@ SDL_AudioStreamClear(SDL_AudioStream *stream)
/* get converted/resampled data from the stream */
int
SDL_AudioStreamGet(SDL_AudioStream *stream, Uint32 len, void *buf, const Uint32 buflen)
SDL_AudioStreamGet(SDL_AudioStream *stream, void *buf, const Uint32 len)
{
if (!stream) {
return SDL_InvalidParamError("stream");
@@ -844,7 +844,7 @@ SDL_AudioStreamGet(SDL_AudioStream *stream, Uint32 len, void *buf, const Uint32
return SDL_SetError("Can't request partial sample frames");
}
return (int) SDL_ReadFromDataQueue(stream->queue, buf, buflen);
return (int) SDL_ReadFromDataQueue(stream->queue, buf, len);
}
/* number of converted/resampled bytes available */