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
template<typename T>
struct SharedChannelVolume {
T vol, outVol, resVol;
T vol, outVol;
SharedChannelVolume(T initVol):
vol(initVol),
outVol(initVol),
resVol(initVol) {}
outVol(initVol) {}
};
#endif

View file

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

View file

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