aboutsummaryrefslogtreecommitdiff
path: root/sound/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sound/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp')
-rw-r--r--sound/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/sound/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp b/sound/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp
index 7b94a46426..0a4984888d 100644
--- a/sound/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp
+++ b/sound/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp
@@ -377,7 +377,7 @@ private:
bool _ready;
};
-#ifndef __DS__
+#ifndef DISABLE_PC98_RHYTHM_CHANNEL
class TownsPC98_FmSynthPercussionSource {
public:
TownsPC98_FmSynthPercussionSource(const uint32 timerbase, const uint32 rtt);
@@ -443,7 +443,7 @@ private:
bool _ready;
};
-#endif
+#endif // DISABLE_PC98_RHYTHM_CHANNEL
TownsPC98_FmSynthSquareSineSource::TownsPC98_FmSynthSquareSineSource(const uint32 timerbase, const uint32 rtt) : _tlTable(0),
_rtt(rtt), _tleTable(0), _updateRequest(-1), _tickLength(timerbase * 27), _ready(0), _reg(0), _rand(1), _outN(1),
@@ -629,7 +629,7 @@ void TownsPC98_FmSynthSquareSineSource::updateRegs() {
_updateRequest = -1;
}
-#ifndef __DS__
+#ifndef DISABLE_PC98_RHYTHM_CHANNEL
TownsPC98_FmSynthPercussionSource::TownsPC98_FmSynthPercussionSource(const uint32 timerbase, const uint32 rtt) :
_rtt(rtt), _tickLength(timerbase * 2), _timer(0), _ready(false), _volMaskA(0), _volMaskB(0), _volumeA(Audio::Mixer::kMaxMixerVolume), _volumeB(Audio::Mixer::kMaxMixerVolume) {
@@ -826,12 +826,12 @@ void TownsPC98_FmSynthPercussionSource::advanceInput(RhtChannel *ins) {
cur >>= 4;
}
}
-#endif // ifndef __DS__
+#endif // DISABLE_PC98_RHYTHM_CHANNEL
TownsPC98_FmSynth::TownsPC98_FmSynth(Audio::Mixer *mixer, EmuType type) :
_mixer(mixer),
_chanInternal(0), _ssg(0),
-#ifndef __DS__
+#ifndef DISABLE_PC98_RHYTHM_CHANNEL
_prc(0),
#endif
_numChan(type == kType26 ? 3 : 6), _numSSG(type == kTypeTowns ? 0 : 3),
@@ -854,7 +854,7 @@ TownsPC98_FmSynth::~TownsPC98_FmSynth() {
deinit();
delete _ssg;
-#ifndef __DS__
+#ifndef DISABLE_PC98_RHYTHM_CHANNEL
delete _prc;
#endif
delete[] _chanInternal;
@@ -888,7 +888,7 @@ bool TownsPC98_FmSynth::init() {
_ssg->init(&_ssgTables[0], &_ssgTables[16]);
}
-#ifndef __DS__
+#ifndef DISABLE_PC98_RHYTHM_CHANNEL
if (_hasPercussion) {
_prc = new TownsPC98_FmSynthPercussionSource(_timerbase, _rtt);
_prc->init(_percussionData);
@@ -922,7 +922,7 @@ void TownsPC98_FmSynth::reset() {
if (_ssg)
_ssg->reset();
-#ifndef __DS__
+#ifndef DISABLE_PC98_RHYTHM_CHANNEL
if (_prc)
_prc->reset();
#endif
@@ -959,7 +959,7 @@ void TownsPC98_FmSynth::writeReg(uint8 part, uint8 regAddress, uint8 value) {
_ssg->writeReg(l, value);
break;
case 0x10:
-#ifndef __DS__
+#ifndef DISABLE_PC98_RHYTHM_CHANNEL
// pcm rhythm channel
if (_prc)
_prc->writeReg(l, value);
@@ -1155,7 +1155,7 @@ int TownsPC98_FmSynth::readBuffer(int16 *buffer, const int numSamples) {
if (_ssg)
_ssg->nextTick(tmp, render);
-#ifndef __DS__
+#ifndef DISABLE_PC98_RHYTHM_CHANNEL
if (_prc)
_prc->nextTick(tmp, render);
#endif
@@ -1194,7 +1194,7 @@ void TownsPC98_FmSynth::setVolumeIntern(int volA, int volB) {
_volumeB = CLIP<uint16>(volB, 0, Audio::Mixer::kMaxMixerVolume);
if (_ssg)
_ssg->setVolumeIntern(_volumeA, _volumeB);
-#ifndef __DS__
+#ifndef DISABLE_PC98_RHYTHM_CHANNEL
if (_prc)
_prc->setVolumeIntern(_volumeA, _volumeB);
#endif
@@ -1206,7 +1206,7 @@ void TownsPC98_FmSynth::setVolumeChannelMasks(int channelMaskA, int channelMaskB
_volMaskB = channelMaskB;
if (_ssg)
_ssg->setVolumeChannelMasks(_volMaskA >> _numChan, _volMaskB >> _numChan);
-#ifndef __DS__
+#ifndef DISABLE_PC98_RHYTHM_CHANNEL
if (_prc)
_prc->setVolumeChannelMasks(_volMaskA >> (_numChan + _numSSG), _volMaskB >> (_numChan + _numSSG));
#endif
@@ -1422,7 +1422,7 @@ const int TownsPC98_FmSynth::_ssgTables[] = {
0x000575, 0x000463, 0x00039D, 0x0002FA, 0x000242, 0x0001B6, 0x00014C, 0x0000FB
};
-#ifndef __DS__
+#ifndef DISABLE_PC98_RHYTHM_CHANNEL
const uint8 TownsPC98_FmSynth::_percussionData[] = {
0, 24, 1, 192, 1, 216, 2, 128, 4, 88, 23, 64, 27, 152, 1, 128, 29, 24, 2, 128, 31, 152, 0, 128, 136, 128, 128, 128, 0, 136, 97, 103, 153, 139, 34, 163, 72, 195, 27, 69, 1, 154, 137, 35, 8, 51, 169, 122, 164, 75, 133, 203, 81, 146, 168, 121, 185, 68, 202, 8, 33, 237, 49, 177, 12, 133, 140, 17, 160, 42, 161, 10, 0, 137, 176, 57,
233, 41, 160, 136, 235, 65, 177, 137, 128, 26, 164, 28, 3, 157, 51, 137, 1, 152, 113, 161, 40, 146, 115, 192, 56, 5, 169, 66, 161, 56, 1, 50, 145, 59, 39, 168, 97, 1, 160, 57, 7, 153, 50, 153, 32, 2, 25, 129, 32, 20, 186, 66, 129, 24, 153, 164, 142, 130, 169, 153, 26, 242, 138, 217, 9, 128, 204, 58, 209, 172, 40, 176, 141,
@@ -1537,7 +1537,7 @@ const uint8 TownsPC98_FmSynth::_percussionData[] = {
45, 136, 18, 144, 105, 138, 1, 160, 14, 128, 132, 145, 186, 37, 138, 41, 192, 48, 145, 46, 160, 33, 44, 24, 225, 16, 13, 132, 136, 137, 16, 148, 25, 170, 194, 82, 152, 136, 91, 24, 42, 169, 33, 233, 131, 179, 24, 185, 149, 16, 57, 172, 164, 18, 10, 211, 160, 147, 211, 33, 138, 243, 129, 16, 41, 193, 0, 43, 132, 155, 73,
58, 145, 244, 145, 43, 35, 9, 171, 16, 110, 25, 8, 28, 74, 162, 128, 26, 27, 82, 45, 136, 153, 18, 8, 136, 8
};
-#endif
+#endif // DISABLE_PC98_RHYTHM_CHANNEL
TownsPC98_FmSynth::ChanInternal::ChanInternal() {
memset(this, 0, sizeof(ChanInternal));