diff --git a/libs/audio/renderer/flac.c b/libs/audio/renderer/flac.c index dfa32c080..708ada4bc 100644 --- a/libs/audio/renderer/flac.c +++ b/libs/audio/renderer/flac.c @@ -344,7 +344,7 @@ flac_stream_read (void *file, float **buf) if (!res) { stream->error = 1; - return -1; + return 0; } *buf = ff->buffer; return ff->size; diff --git a/libs/audio/renderer/midi.c b/libs/audio/renderer/midi.c index 73ec31282..c2698aac2 100644 --- a/libs/audio/renderer/midi.c +++ b/libs/audio/renderer/midi.c @@ -109,7 +109,7 @@ midi_stream_read (void *file, float **buf) res = WildMidi_GetOutput (mf->handle, (char *)data, size); if (res <= 0) { stream->error = 1; - return res; + return 0; } res /= CHANNELS * WIDTH; SND_Convert (data, mf->data, res, CHANNELS, WIDTH); diff --git a/libs/audio/renderer/vorbis.c b/libs/audio/renderer/vorbis.c index 2d8bf2453..ce2588920 100644 --- a/libs/audio/renderer/vorbis.c +++ b/libs/audio/renderer/vorbis.c @@ -230,7 +230,7 @@ vorbis_stream_read (void *file, float **buf) res = vorbis_read (vf->vf, vf->data, FRAMES, &stream->wavinfo); if (res <= 0) { stream->error = 1; - return res; + return 0; } *buf = vf->data; return res; diff --git a/libs/audio/renderer/wav.c b/libs/audio/renderer/wav.c index c33fae126..0ee193fa2 100644 --- a/libs/audio/renderer/wav.c +++ b/libs/audio/renderer/wav.c @@ -114,7 +114,7 @@ wav_stream_read (void *file, float **buf) res = Qread (wf->file, data, len); if (res <= 0) { stream->error = 1; - return res; + return 0; } res /= (info->channels * info->width); SND_Convert (data, wf->data, res, info->channels, info->width);