Reduce duplicates of channel struct

Add/Fix custom clock limit defines (for YMF278B)
This commit is contained in:
cam900 2022-12-04 19:58:58 +09:00
parent fd3f381bc3
commit 2ec4237076
69 changed files with 457 additions and 1151 deletions

View file

@ -25,11 +25,7 @@
#include "../macroInt.h"
class DivPlatformZXBeeper: public DivDispatch {
struct Channel {
int freq, baseFreq, pitch, pitch2, note;
int ins;
bool active, insChanged, freqChanged, keyOn, keyOff, inPorta;
signed char vol, outVol;
struct Channel: public SharedChannelFreq, public SharedChannelVolume<signed char> {
unsigned short sPosition;
unsigned char duty;
DivMacroInt std;
@ -38,20 +34,8 @@ class DivPlatformZXBeeper: public DivDispatch {
pitch2=0;
}
Channel():
freq(0),
baseFreq(0),
pitch(0),
pitch2(0),
note(0),
ins(-1),
active(false),
insChanged(true),
freqChanged(false),
keyOn(false),
keyOff(false),
inPorta(false),
vol(1),
outVol(1),
SharedChannelFreq(),
SharedChannelVolume<signed char>(1),
sPosition(0),
duty(64) {}
};