mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-24 23:10:10 +01:00
make invalid IMA not crash, just sound lousy
git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@223 51a99a44-fe44-0410-b1ba-c3e57ba2b86b
This commit is contained in:
parent
933053a1bb
commit
453e5c148f
@ -80,6 +80,8 @@ void decode_xbox_ima(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspac
|
||||
if (first_sample == 0) {
|
||||
hist1 = read_16bitLE(offset+channel*4,stream->streamfile);
|
||||
step_index = read_16bitLE(offset+channel*4+2,stream->streamfile);
|
||||
if (step_index < 0) step_index=0;
|
||||
if (step_index > 88) step_index=88;
|
||||
}
|
||||
|
||||
for (i=first_sample,sample_count=0; i<first_sample+samples_to_do; i++,sample_count+=channelspacing) {
|
||||
|
Loading…
Reference in New Issue
Block a user