git ssb

0+

kode54 / syntrax-c



Commit e53977afa504fe961bd61e048e74d6ddd0f598b3

Revert "Eliminate bkpSynthPos, and instead store a synthPos member in TuneChannel, which is reset to 0 by playInstrument, assigned to Voice before mixing, and saved back to TuneChannel before the Overlap is calculated."

This reverts commit d2d123ccc873a72eb444dabe4fa5d139fbfba90f.
Christopher Snowhill authored on 1/2/2016, 4:44:36 PM
Christopher Snowhill committed on 6/13/2018, 12:10:58 AM
Parent: 7546e2f74d2ea029c47a53149da67f11f39cb16a

Files changed

src/syntrax/syntrax.cchanged
src/syntrax/syntrax.hchanged
src/syntrax/syntrax.cView
@@ -41,9 +41,8 @@
4141 tc->sampleBuffer = NULL;
4242 tc->smpLoopEnd = 0;
4343 //tc->smpLength = 0;
4444 tc->sampPos = 0;
45- tc->synthPos = 0;
4645 tc->EYRXAB = 0;
4746 tc->volume = 0;
4847 tc->panning = 0;
4948 tc->VNVJPDIWAJQ = 0;
@@ -969,9 +968,8 @@
969968 tc->hasLooped = 0;
970969 tc->isPlayingBackward = 0;
971970 tc->EYRXAB = -1;
972971 tc->fmDelay = ins->fmDelay;
973- tc->synthPos = 0;
974972
975973 for (i = 0; i < 16; i++) {
976974 if (ins->m_ResetWave[i]){
977975 //ins->synthBuffers[i].copyTo(tc.synthBuffers[i]);
@@ -1785,9 +1783,8 @@
17851783 {
17861784 int waveNum = p->instruments[insNum].waveform;
17871785 v->wavelength = (p->instruments[insNum].wavelength) - 1;
17881786 v->waveBuff = tc->synthBuffers[waveNum];
1789- v->synthPos = tc->synthPos;
17901787 v->isSample = 0;
17911788 }
17921789 else
17931790 {
@@ -1991,19 +1988,18 @@
19911988 tc->sampPos = v->sampPos;
19921989 tc->isPlayingBackward = v->isPlayingBackward;
19931990 tc->hasLooped = v->hasLooped;
19941991 }
1995- else
1996- {
1997- tc->synthPos = v->synthPos;
1998- }
19991992 }
20001993 }
20011994 if ( p->otherSamplesPerBeat == (p->samplesPerBeat * p->SAMPLEFREQUENCY) / 44100 )
20021995 {
20031996 p->bkpDelayPos = p->delayPos;
20041997 for (i = 0; i < p->channelNumber; i++)
1998+ {
1999+ p->voices[i].bkpSynthPos = p->voices[i].synthPos;
20052000 resampler_dup_inplace(p->voices[i].resampler[1], p->voices[i].resampler[0]);
2001+ }
20062002
20072003 p->overlapPos = 0;
20082004 if ( outBuff )
20092005 {
@@ -2111,8 +2107,9 @@
21112107 p->delayPos = ++p->delayPos % otherDelayTime;
21122108 }
21132109 }
21142110 p->delayPos = p->bkpDelayPos;
2111+ for (i = 0; i < p->channelNumber; i++) p->voices[i].synthPos = p->voices[i].bkpSynthPos;
21152112
21162113 //dword_66327200 = 2 * sampleNum;
21172114 advanceTick(p);
21182115 }
src/syntrax/syntrax.hView
@@ -48,8 +48,9 @@
4848 int hasBidiLoop;
4949 int synthPos;
5050 int gainRight;
5151 int smpLoopStart;
52+ int bkpSynthPos;
5253 int sampPos;
5354 int gainLeft;
5455 int hasLoop;
5556 int smpLength;
@@ -90,9 +91,8 @@
9091 int fmDelay;
9192 int volume;
9293 int ACKCWV;
9394 int sampPos;
94- int synthPos;
9595 int insNum;
9696 int EQMIWERPIF;
9797 int freq;
9898 int HFRLJCG;

Built with git-ssb-web