diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/audio.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/audio.c b/src/audio.c index f5dc5ee..001d449 100644 --- a/src/audio.c +++ b/src/audio.c @@ -178,6 +178,10 @@ ssize_t xas_audio_stream_read(xas_audio_stream *stream, size_t count) { *samples = stream + 1; + if (count > stream->buffer_size) { + count = stream->buffer_size; + } + return stream->fill(stream->ctx, *samples, count, |