resVol isn't shared

This commit is contained in:
tildearrow 2022-12-12 17:18:13 -05:00
parent b903a4276e
commit e58fb42d52
3 changed files with 7 additions and 4 deletions

View file

@ -56,11 +56,10 @@ struct SharedChannelFreq: public SharedChannel {
// common shared channel volume struct // common shared channel volume struct
template<typename T> template<typename T>
struct SharedChannelVolume { struct SharedChannelVolume {
T vol, outVol, resVol; T vol, outVol;
SharedChannelVolume(T initVol): SharedChannelVolume(T initVol):
vol(initVol), vol(initVol),
outVol(initVol), outVol(initVol) {}
resVol(initVol) {}
}; };
#endif #endif

View file

@ -28,6 +28,7 @@
class DivPlatformN163: public DivDispatch { class DivPlatformN163: public DivDispatch {
struct Channel: public SharedChannelFreq, public SharedChannelVolume<signed char> { struct Channel: public SharedChannelFreq, public SharedChannelVolume<signed char> {
signed char resVol;
short wave, wavePos, waveLen; short wave, wavePos, waveLen;
unsigned char waveMode; unsigned char waveMode;
short loadWave, loadPos, loadLen; short loadWave, loadPos, loadLen;
@ -43,6 +44,7 @@ class DivPlatformN163: public DivDispatch {
Channel(): Channel():
SharedChannelFreq(), SharedChannelFreq(),
SharedChannelVolume<signed char>(15), SharedChannelVolume<signed char>(15),
resVol(15),
wave(-1), wave(-1),
wavePos(0), wavePos(0),
waveLen(0), waveLen(0),

View file

@ -27,6 +27,7 @@
class DivPlatformQSound: public DivDispatch { class DivPlatformQSound: public DivDispatch {
struct Channel: public SharedChannelFreq, public SharedChannelVolume<int> { struct Channel: public SharedChannelFreq, public SharedChannelVolume<int> {
int resVol;
int sample, wave; int sample, wave;
int panning; int panning;
int echo; int echo;
@ -38,7 +39,8 @@ class DivPlatformQSound: public DivDispatch {
} }
Channel(): Channel():
SharedChannelFreq(), SharedChannelFreq(),
SharedChannelVolume<int>(4095), SharedChannelVolume<int>(255),
resVol(4095),
sample(-1), sample(-1),
panning(0x10), panning(0x10),
echo(0), echo(0),