mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-08 10:56:27 +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:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user