mirror of
https://github.com/tildearrow/furnace.git
synced 2025-01-03 22:21:09 +00:00
Genesis: fix sample desync when muting DAC channel
This commit is contained in:
parent
4327654415
commit
371c23a7ee
1 changed files with 3 additions and 3 deletions
|
@ -20,12 +20,12 @@ void DivPlatformGenesis::acquire(short* bufL, short* bufR, size_t start, size_t
|
||||||
DivSample* s=parent->song.sample[dacSample];
|
DivSample* s=parent->song.sample[dacSample];
|
||||||
if (!isMuted[5]) {
|
if (!isMuted[5]) {
|
||||||
if (s->depth==8) {
|
if (s->depth==8) {
|
||||||
immWrite(0x2a,(unsigned char)s->rendData[dacPos++]+0x80);
|
immWrite(0x2a,(unsigned char)s->rendData[dacPos]+0x80);
|
||||||
} else {
|
} else {
|
||||||
immWrite(0x2a,((unsigned short)s->rendData[dacPos++]+0x8000)>>8);
|
immWrite(0x2a,((unsigned short)s->rendData[dacPos]+0x8000)>>8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (dacPos>=s->rendLength) {
|
if (++dacPos>=s->rendLength) {
|
||||||
if (s->loopStart>=0 && s->loopStart<=(int)s->rendLength) {
|
if (s->loopStart>=0 && s->loopStart<=(int)s->rendLength) {
|
||||||
dacPos=s->loopStart;
|
dacPos=s->loopStart;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue