mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-03 23:52:41 +00:00
parent
c6a4a1d37d
commit
ed6521f332
@ -933,6 +933,7 @@ void ChannelMP3CDMusic::mix(int16 *data, uint len) {
|
||||
memset(_ptr, 0, _bufferSize);
|
||||
_size = _file->read(_ptr, _bufferSize);
|
||||
if (_size <= 0) {
|
||||
debug(1, "Failed to read MP3 data during channel initialisation !");
|
||||
destroy();
|
||||
return;
|
||||
}
|
||||
@ -1006,6 +1007,9 @@ void ChannelMP3CDMusic::mix(int16 *data, uint len) {
|
||||
memcpy(_ptr, _stream.next_frame, not_decoded);
|
||||
_size = _file->read(_ptr + not_decoded, _bufferSize - not_decoded);
|
||||
}
|
||||
if (_size <= 0) {
|
||||
return;
|
||||
}
|
||||
_stream.error = (enum mad_error)0;
|
||||
// Restream
|
||||
mad_stream_buffer(&_stream, _ptr, _size + not_decoded);
|
||||
|
Loading…
Reference in New Issue
Block a user