mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-31 13:10:34 +00:00
bah, forgot that libsamplerate doesn't check for errors
This commit is contained in:
parent
54fc922f6c
commit
cc697236e5
4 changed files with 4 additions and 4 deletions
|
@ -344,7 +344,7 @@ flac_stream_read (void *file, float **buf)
|
||||||
|
|
||||||
if (!res) {
|
if (!res) {
|
||||||
stream->error = 1;
|
stream->error = 1;
|
||||||
return -1;
|
return 0;
|
||||||
}
|
}
|
||||||
*buf = ff->buffer;
|
*buf = ff->buffer;
|
||||||
return ff->size;
|
return ff->size;
|
||||||
|
|
|
@ -109,7 +109,7 @@ midi_stream_read (void *file, float **buf)
|
||||||
res = WildMidi_GetOutput (mf->handle, (char *)data, size);
|
res = WildMidi_GetOutput (mf->handle, (char *)data, size);
|
||||||
if (res <= 0) {
|
if (res <= 0) {
|
||||||
stream->error = 1;
|
stream->error = 1;
|
||||||
return res;
|
return 0;
|
||||||
}
|
}
|
||||||
res /= CHANNELS * WIDTH;
|
res /= CHANNELS * WIDTH;
|
||||||
SND_Convert (data, mf->data, res, CHANNELS, WIDTH);
|
SND_Convert (data, mf->data, res, CHANNELS, WIDTH);
|
||||||
|
|
|
@ -230,7 +230,7 @@ vorbis_stream_read (void *file, float **buf)
|
||||||
res = vorbis_read (vf->vf, vf->data, FRAMES, &stream->wavinfo);
|
res = vorbis_read (vf->vf, vf->data, FRAMES, &stream->wavinfo);
|
||||||
if (res <= 0) {
|
if (res <= 0) {
|
||||||
stream->error = 1;
|
stream->error = 1;
|
||||||
return res;
|
return 0;
|
||||||
}
|
}
|
||||||
*buf = vf->data;
|
*buf = vf->data;
|
||||||
return res;
|
return res;
|
||||||
|
|
|
@ -114,7 +114,7 @@ wav_stream_read (void *file, float **buf)
|
||||||
res = Qread (wf->file, data, len);
|
res = Qread (wf->file, data, len);
|
||||||
if (res <= 0) {
|
if (res <= 0) {
|
||||||
stream->error = 1;
|
stream->error = 1;
|
||||||
return res;
|
return 0;
|
||||||
}
|
}
|
||||||
res /= (info->channels * info->width);
|
res /= (info->channels * info->width);
|
||||||
SND_Convert (data, wf->data, res, info->channels, info->width);
|
SND_Convert (data, wf->data, res, info->channels, info->width);
|
||||||
|
|
Loading…
Reference in a new issue