aboutsummaryrefslogtreecommitdiff
path: root/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.h
diff options
context:
space:
mode:
authorathrxx2018-12-04 17:49:15 +0100
committerathrxx2019-03-07 19:43:44 +0100
commit20b378a41a194bd0869bfc2bb16b9a6897bd8bd2 (patch)
tree78cd4b25468e7aa1103e7ae0c81d91398c38e085 /audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.h
parent82a821bf7f25716a124b2d14b26c9c8a28b74e6e (diff)
downloadscummvm-rg350-20b378a41a194bd0869bfc2bb16b9a6897bd8bd2.tar.gz
scummvm-rg350-20b378a41a194bd0869bfc2bb16b9a6897bd8bd2.tar.bz2
scummvm-rg350-20b378a41a194bd0869bfc2bb16b9a6897bd8bd2.zip
AUDIO: (FM-TOWNS/PC-98) - cleanup
Apart from some basic cleanup this commit reverts a somewhat unfortunate design decision I made. The Kyra/Hof/Lol PC-98 sound drivers shouldn't inherit from the emulator. This commit separates the driver from the emulator putting some common interface in between. This should allow easier implementation of other PC-98 sound drivers.
Diffstat (limited to 'audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.h')
-rw-r--r--audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.h b/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.h
index 5af92820ca..ba484e2413 100644
--- a/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.h
+++ b/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.h
@@ -66,6 +66,7 @@ public:
virtual void reset();
void writeReg(uint8 part, uint8 regAddress, uint8 value);
+ uint8 readReg(uint8 part, uint8 regAddress);
// AudioStream interface
int readBuffer(int16 *buffer, const int numSamples);
@@ -80,9 +81,6 @@ protected:
// additional output that has to be inserted into the buffer.
virtual void nextTickEx(int32 *buffer, uint32 bufferSize) {}
- void toggleRegProtection(bool prot);
- uint8 readSSGStatus();
-
virtual void timerCallbackA() = 0;
virtual void timerCallbackB() = 0;
@@ -94,6 +92,8 @@ protected:
void setVolumeIntern(int volA, int volB);
void setVolumeChannelMasks(int channelMaskA, int channelMaskB);
+ void setLevelSSG(int vol);
+
const int _numChan;
const int _numSSG;
const bool _hasPercussion;
@@ -104,7 +104,6 @@ protected:
private:
void generateTables();
void nextTick(int32 *buffer, uint32 bufferSize);
- void generateOutput(int32 &leftSample, int32 &rightSample, int32 *del, int32 *feed);
struct ChanInternal {
ChanInternal();
@@ -171,6 +170,8 @@ private:
uint32 _timerbase;
uint32 _rtt;
+ uint8 _registers[255][2];
+
Audio::Mixer *_mixer;
Audio::SoundHandle _soundHandle;