mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-02 10:55:05 +00:00
Merge branch 'sample_macro' of github.com:tildearrow/furnace into sample_macro
This commit is contained in:
commit
e82374fcde
2 changed files with 35 additions and 32 deletions
|
@ -91,28 +91,30 @@ void DivPlatformMSM6258::acquire(short* bufL, short* bufR, size_t start, size_t
|
|||
|
||||
void DivPlatformMSM6258::tick(bool sysTick) {
|
||||
for (int i=0; i<1; i++) {
|
||||
chan[i].std.next();
|
||||
if (chan[i].std.duty.had) {
|
||||
if (rateSel!=(chan[i].std.duty.val&3)) {
|
||||
rateSel=chan[i].std.duty.val&3;
|
||||
rWrite(12,rateSel);
|
||||
if (!parent->song.disableSampleMacro) {
|
||||
chan[i].std.next();
|
||||
if (chan[i].std.duty.had) {
|
||||
if (rateSel!=(chan[i].std.duty.val&3)) {
|
||||
rateSel=chan[i].std.duty.val&3;
|
||||
rWrite(12,rateSel);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (chan[i].std.panL.had) {
|
||||
if (chan[i].pan!=(chan[i].std.panL.val&3)) {
|
||||
chan[i].pan=chan[i].std.panL.val&3;
|
||||
rWrite(2,chan[i].pan);
|
||||
if (chan[i].std.panL.had) {
|
||||
if (chan[i].pan!=(chan[i].std.panL.val&3)) {
|
||||
chan[i].pan=chan[i].std.panL.val&3;
|
||||
rWrite(2,chan[i].pan);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (chan[i].std.ex1.had) {
|
||||
if (clockSel!=(chan[i].std.ex1.val&1)) {
|
||||
clockSel=chan[i].std.ex1.val&1;
|
||||
rWrite(8,clockSel);
|
||||
if (chan[i].std.ex1.had) {
|
||||
if (clockSel!=(chan[i].std.ex1.val&1)) {
|
||||
clockSel=chan[i].std.ex1.val&1;
|
||||
rWrite(8,clockSel);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (chan[i].std.phaseReset.had) {
|
||||
if (chan[i].std.phaseReset.val && chan[i].active) {
|
||||
chan[i].keyOn=true;
|
||||
if (chan[i].std.phaseReset.had) {
|
||||
if (chan[i].std.phaseReset.val && chan[i].active) {
|
||||
chan[i].keyOn=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (chan[i].keyOn || chan[i].keyOff) {
|
||||
|
|
|
@ -88,21 +88,22 @@ void DivPlatformMSM6295::acquire(short* bufL, short* bufR, size_t start, size_t
|
|||
}
|
||||
|
||||
void DivPlatformMSM6295::tick(bool sysTick) {
|
||||
if (parent->song.disableSampleMacro) return;
|
||||
for (int i=0; i<4; i++) {
|
||||
chan[i].std.next();
|
||||
if (chan[i].std.vol.had) {
|
||||
chan[i].outVol=VOL_SCALE_LOG(chan[i].std.vol.val,chan[i].vol,8);
|
||||
}
|
||||
if (chan[i].std.duty.had) {
|
||||
if (rateSel!=(chan[i].std.duty.val&1)) {
|
||||
rateSel=chan[i].std.duty.val&1;
|
||||
rWrite(12,!rateSel);
|
||||
if (!parent->song.disableSampleMacro) {
|
||||
chan[i].std.next();
|
||||
if (chan[i].std.vol.had) {
|
||||
chan[i].outVol=VOL_SCALE_LOG(chan[i].std.vol.val,chan[i].vol,8);
|
||||
}
|
||||
}
|
||||
if (chan[i].std.phaseReset.had) {
|
||||
if (chan[i].std.phaseReset.val && chan[i].active) {
|
||||
chan[i].keyOn=true;
|
||||
if (chan[i].std.duty.had) {
|
||||
if (rateSel!=(chan[i].std.duty.val&1)) {
|
||||
rateSel=chan[i].std.duty.val&1;
|
||||
rWrite(12,!rateSel);
|
||||
}
|
||||
}
|
||||
if (chan[i].std.phaseReset.had) {
|
||||
if (chan[i].std.phaseReset.val && chan[i].active) {
|
||||
chan[i].keyOn=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (chan[i].keyOn || chan[i].keyOff) {
|
||||
|
|
Loading…
Reference in a new issue