mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-15 17:25:06 +00:00
fix #172
This commit is contained in:
parent
53482105dc
commit
bfb902f649
2 changed files with 7 additions and 1 deletions
|
@ -106,7 +106,10 @@ void DivPlatformSMS::tick() {
|
||||||
}
|
}
|
||||||
if (value<3) {
|
if (value<3) {
|
||||||
value=2-value;
|
value=2-value;
|
||||||
rWrite(0xe0|value|((snNoiseMode&1)<<2));
|
if (value!=oldValue || updateSNMode || resetPhase) {
|
||||||
|
oldValue=value;
|
||||||
|
rWrite(0xe0|value|((snNoiseMode&1)<<2));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
chan[3].freqChanged=false;
|
chan[3].freqChanged=false;
|
||||||
|
@ -240,6 +243,7 @@ void DivPlatformSMS::reset() {
|
||||||
snNoiseMode=3;
|
snNoiseMode=3;
|
||||||
rWrite(0xe7);
|
rWrite(0xe7);
|
||||||
updateSNMode=false;
|
updateSNMode=false;
|
||||||
|
oldValue=0xff;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DivPlatformSMS::keyOffAffectsArp(int ch) {
|
bool DivPlatformSMS::keyOffAffectsArp(int ch) {
|
||||||
|
@ -304,6 +308,7 @@ int DivPlatformSMS::init(DivEngine* p, int channels, int sugRate, unsigned int f
|
||||||
dumpWrites=false;
|
dumpWrites=false;
|
||||||
skipRegisterWrites=false;
|
skipRegisterWrites=false;
|
||||||
resetPhase=false;
|
resetPhase=false;
|
||||||
|
oldValue=0xff;
|
||||||
for (int i=0; i<4; i++) {
|
for (int i=0; i<4; i++) {
|
||||||
isMuted[i]=false;
|
isMuted[i]=false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,7 @@ class DivPlatformSMS: public DivDispatch {
|
||||||
};
|
};
|
||||||
Channel chan[4];
|
Channel chan[4];
|
||||||
bool isMuted[4];
|
bool isMuted[4];
|
||||||
|
unsigned char oldValue;
|
||||||
unsigned char snNoiseMode;
|
unsigned char snNoiseMode;
|
||||||
bool updateSNMode;
|
bool updateSNMode;
|
||||||
bool resetPhase;
|
bool resetPhase;
|
||||||
|
|
Loading…
Reference in a new issue