the chips that still do not have sample offset

- Lynx
- MMC5
- NES
- PCE
- QSound
- SegaPCM
- Swan
- VERA
- VRC6
- X1-010
This commit is contained in:
tildearrow 2024-04-24 00:34:15 -05:00
parent 41e59cee5f
commit 84437bf0e3
11 changed files with 25 additions and 16 deletions

View file

@ -45,7 +45,7 @@ class DivPlatformLynx: public DivDispatch {
MikeyDuty duty;
int actualNote, lfsr, sample, samplePos, sampleAccum, sampleBaseFreq, sampleFreq;
unsigned char pan;
bool pcm;
bool pcm, setPos;
int macroVolMul;
Channel():
SharedChannel<signed char>(127),
@ -60,6 +60,7 @@ class DivPlatformLynx: public DivDispatch {
sampleFreq(0),
pan(0xff),
pcm(false),
setPos(false),
macroVolMul(127) {}
};
Channel chan[4];

View file

@ -26,14 +26,15 @@ class DivPlatformMMC5: public DivDispatch {
struct Channel: public SharedChannel<signed char> {
int prevFreq;
unsigned char duty, sweep;
bool sweepChanged, furnaceDac;
bool sweepChanged, furnaceDac, setPos;
Channel():
SharedChannel<signed char>(15),
prevFreq(65535),
duty(0),
sweep(8),
sweepChanged(false),
furnaceDac(false) {}
furnaceDac(false),
setPos(false) {}
};
Channel chan[5];
DivDispatchOscBuffer* oscBuf[3];

View file

@ -29,7 +29,7 @@ class DivPlatformNES: public DivDispatch {
struct Channel: public SharedChannel<signed char> {
int prevFreq;
unsigned char duty, sweep, envMode, len;
bool sweepChanged, furnaceDac;
bool sweepChanged, furnaceDac, setPos;
Channel():
SharedChannel<signed char>(15),
prevFreq(65535),
@ -38,7 +38,8 @@ class DivPlatformNES: public DivDispatch {
envMode(3),
len(0x1f),
sweepChanged(false),
furnaceDac(false) {}
furnaceDac(false),
setPos(false) {}
};
Channel chan[5];
DivDispatchOscBuffer* oscBuf[5];

View file

@ -32,7 +32,7 @@ class DivPlatformPCE: public DivDispatch {
unsigned int dacPos;
int dacSample;
unsigned char pan;
bool noise, pcm, furnaceDac, deferredWaveUpdate;
bool noise, pcm, furnaceDac, deferredWaveUpdate, setPos;
signed short wave;
int macroVolMul, noiseSeek;
DivWaveSynth ws;
@ -50,6 +50,7 @@ class DivPlatformPCE: public DivDispatch {
pcm(false),
furnaceDac(false),
deferredWaveUpdate(false),
setPos(false),
wave(-1),
macroVolMul(31),
noiseSeek(0) {}

View file

@ -29,7 +29,7 @@ class DivPlatformQSound: public DivDispatch {
int sample, wave;
int panning;
int echo;
bool useWave, surround, isNewQSound;
bool useWave, surround, isNewQSound, setPos;
Channel():
SharedChannel<int>(255),
resVol(4095),
@ -39,7 +39,8 @@ class DivPlatformQSound: public DivDispatch {
echo(0),
useWave(false),
surround(true),
isNewQSound(false) {}
isNewQSound(false),
setPos(false) {}
};
Channel chan[19];
DivDispatchOscBuffer* oscBuf[19];

View file

@ -28,7 +28,7 @@
class DivPlatformSegaPCM: public DivDispatch {
protected:
struct Channel: public SharedChannel<int> {
bool furnacePCM, isNewSegaPCM;
bool furnacePCM, isNewSegaPCM, setPos;
unsigned char chVolL, chVolR;
unsigned char chPanL, chPanR;
int macroVolMul;
@ -44,6 +44,7 @@ class DivPlatformSegaPCM: public DivDispatch {
SharedChannel<int>(127),
furnacePCM(false),
isNewSegaPCM(false),
setPos(false),
chVolL(127),
chVolR(127),
chPanL(127),

View file

@ -556,6 +556,7 @@ void DivPlatformSwan::reset() {
pcm=false;
sweep=false;
furnaceDac=false;
setPos=false;
noise=0;
dacPeriod=0;
dacRate=0;

View file

@ -38,7 +38,7 @@ class DivPlatformSwan: public DivDispatch {
Channel chan[4];
DivDispatchOscBuffer* oscBuf[4];
bool isMuted[4];
bool pcm, sweep, furnaceDac;
bool pcm, sweep, furnaceDac, setPos;
unsigned char sampleBank, noise;
int dacPeriod, dacRate;
unsigned int dacPos;

View file

@ -38,8 +38,8 @@ class DivPlatformVERA: public DivDispatch {
unsigned int pos;
unsigned int len;
unsigned char freq;
bool depth16;
PCMChannel(): sample(-1), pos(0), len(0), freq(0), depth16(false) {}
bool depth16, setPos;
PCMChannel(): sample(-1), pos(0), len(0), freq(0), depth16(false), setPos(false) {}
} pcm;
Channel():
SharedChannel<int>(0),

View file

@ -31,7 +31,7 @@ class DivPlatformVRC6: public DivDispatch, public vrcvi_intf {
unsigned int dacPos;
int dacSample;
unsigned char duty;
bool pcm, furnaceDac;
bool pcm, furnaceDac, setPos;
Channel():
SharedChannel<signed char>(15),
dacPeriod(0),
@ -41,7 +41,8 @@ class DivPlatformVRC6: public DivDispatch, public vrcvi_intf {
dacSample(-1),
duty(0),
pcm(false),
furnaceDac(false) {}
furnaceDac(false),
setPos(false) {}
};
Channel chan[3];
DivDispatchOscBuffer* oscBuf[3];

View file

@ -70,7 +70,7 @@ class DivPlatformX1_010: public DivDispatch, public vgsound_emu_mem_intf {
int fixedFreq;
int wave, sample;
unsigned char pan, autoEnvNum, autoEnvDen;
bool envChanged, furnacePCM, pcm;
bool envChanged, furnacePCM, pcm, setPos;
int lvol, rvol;
int macroVolMul;
unsigned char waveBank;
@ -84,7 +84,7 @@ class DivPlatformX1_010: public DivDispatch, public vgsound_emu_mem_intf {
autoEnvNum=autoEnvDen=0;
active=false;
insChanged=envChanged=freqChanged=true;
keyOn=keyOff=inPorta=furnacePCM=pcm=false;
keyOn=keyOff=inPorta=furnacePCM=pcm=setPos=false;
vol=outVol=lvol=rvol=15;
waveBank=0;
}
@ -99,6 +99,7 @@ class DivPlatformX1_010: public DivDispatch, public vgsound_emu_mem_intf {
envChanged(true),
furnacePCM(false),
pcm(false),
setPos(false),
lvol(15),
rvol(15),
macroVolMul(15),