aboutsummaryrefslogtreecommitdiff
path: root/audio/softsynth/fmtowns_pc98/towns_pc98_driver.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_driver.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_driver.h')
-rw-r--r--audio/softsynth/fmtowns_pc98/towns_pc98_driver.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/audio/softsynth/fmtowns_pc98/towns_pc98_driver.h b/audio/softsynth/fmtowns_pc98/towns_pc98_driver.h
index 918446f6c5..0b9edcfd58 100644
--- a/audio/softsynth/fmtowns_pc98/towns_pc98_driver.h
+++ b/audio/softsynth/fmtowns_pc98/towns_pc98_driver.h
@@ -23,7 +23,7 @@
#ifndef TOWNS_PC98_AUDIODRIVER_H
#define TOWNS_PC98_AUDIODRIVER_H
-#include "audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.h"
+#include "audio/softsynth/fmtowns_pc98/pc98_audio.h"
class TownsPC98_MusicChannel;
class TownsPC98_MusicChannelSSG;
@@ -32,7 +32,7 @@ class TownsPC98_SfxChannel;
class TownsPC98_MusicChannelPCM;
#endif
-class TownsPC98_AudioDriver : public TownsPC98_FmSynth {
+class TownsPC98_AudioDriver : public PC98AudioPluginDriver {
friend class TownsPC98_MusicChannel;
friend class TownsPC98_MusicChannelSSG;
friend class TownsPC98_SfxChannel;
@@ -60,6 +60,9 @@ public:
void setSoundEffectVolume(int volume);
private:
+ void writeReg(uint8 part, uint8 reg, uint8 val);
+ void preventRegisterWrite(bool prevent);
+
void timerCallbackA();
void timerCallbackB();
@@ -106,8 +109,12 @@ private:
uint8 *_sfxData;
uint16 _sfxOffsets[2];
- uint16 _musicVolume;
- uint16 _sfxVolume;
+ bool _regWriteProtect;
+ PC98AudioCore *_pc98a;
+
+ const int _numChanFM;
+ const int _numChanSSG;
+ const int _numChanRHY;
static const uint8 _drvTables[];