mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-13 18:20:50 +01:00
An experimental block for preserving adpcm history through loop.
git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@9 51a99a44-fe44-0410-b1ba-c3e57ba2b86b
This commit is contained in:
parent
f462ecbb71
commit
b5c0db2cb7
@ -25,7 +25,22 @@ void render_vgmstream_interleave(sample * buffer, int32_t sample_count, VGMSTREA
|
|||||||
if (vgmstream->loop_flag) {
|
if (vgmstream->loop_flag) {
|
||||||
/* is this the loop end? */
|
/* is this the loop end? */
|
||||||
if (vgmstream->current_sample==vgmstream->loop_end_sample) {
|
if (vgmstream->current_sample==vgmstream->loop_end_sample) {
|
||||||
/* TODO: depending on the codec we may not want to copy all of the state */
|
/* depending on the codec we may not want to copy all of the state */
|
||||||
|
/*
|
||||||
|
switch (vgmstream->coding_type) {
|
||||||
|
case coding_CRI_ADX:
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i=0;i<vgmstream->channels;i++) {
|
||||||
|
vgmstream->loop_ch[i].adpcm_history1_32 = vgmstream->ch[i].adpcm_history1_32;
|
||||||
|
vgmstream->loop_ch[i].adpcm_history2_32 = vgmstream->ch[i].adpcm_history2_32;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
*/
|
||||||
/* restore! */
|
/* restore! */
|
||||||
memcpy(vgmstream->ch,vgmstream->loop_ch,sizeof(VGMSTREAMCHANNEL)*vgmstream->channels);
|
memcpy(vgmstream->ch,vgmstream->loop_ch,sizeof(VGMSTREAMCHANNEL)*vgmstream->channels);
|
||||||
vgmstream->current_sample=vgmstream->loop_sample;
|
vgmstream->current_sample=vgmstream->loop_sample;
|
||||||
|
Loading…
Reference in New Issue
Block a user