mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-12 01:30:49 +01:00
Fix .wem DSP full loops
This commit is contained in:
parent
7f240f4c45
commit
83e4f8cb28
@ -221,6 +221,7 @@ VGMSTREAM * init_vgmstream_wwise(STREAMFILE *streamFile) {
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
||||
start_offset = ww.data_offset;
|
||||
|
||||
/* build the VGMSTREAM */
|
||||
@ -444,6 +445,15 @@ VGMSTREAM * init_vgmstream_wwise(STREAMFILE *streamFile) {
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/* for some reason all(?) DSP .wem do full loops (even mono/jingles/etc) but
|
||||
* several tracks do loop like this, so disable it for short-ish tracks */
|
||||
if (ww.loop_flag && vgmstream->loop_start_sample == 0 &&
|
||||
vgmstream->loop_end_sample < 20*ww.sample_rate) { /* in seconds */
|
||||
vgmstream->loop_flag = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* get coefs and default history */
|
||||
dsp_read_coefs(vgmstream,streamFile,wiih_offset, 0x2e, ww.big_endian);
|
||||
for (i=0; i < ww.channels; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user