aboutsummaryrefslogtreecommitdiff
path: root/sound/softsynth/fmtowns_pc98/towns_euphony.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sound/softsynth/fmtowns_pc98/towns_euphony.cpp')
-rw-r--r--sound/softsynth/fmtowns_pc98/towns_euphony.cpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/sound/softsynth/fmtowns_pc98/towns_euphony.cpp b/sound/softsynth/fmtowns_pc98/towns_euphony.cpp
index 4fe645e2fc..13120df17a 100644
--- a/sound/softsynth/fmtowns_pc98/towns_euphony.cpp
+++ b/sound/softsynth/fmtowns_pc98/towns_euphony.cpp
@@ -130,8 +130,19 @@ void TownsEuphonyDriver::unloadWaveTable(int id) {
_intf->callback(35, id);
}
-void TownsEuphonyDriver::reserveSfxChannels(int num) {
+void TownsEuphonyDriver::reserveSoundEffectChannels(int num) {
_intf->callback(33, num);
+ uint32 volMask = 0;
+
+ if (num > 8)
+ return;
+
+ for (uint32 v = 1 << 13; num; num--) {
+ volMask |= v;
+ v >>= 1;
+ }
+
+ _intf->setSoundEffectChanMask(volMask);
}
int TownsEuphonyDriver::setMusicTempo(int tempo) {
@@ -289,6 +300,14 @@ void TownsEuphonyDriver::timerCallback(int timerId) {
}
}
+void TownsEuphonyDriver::setMusicVolume(int volume) {
+ _intf->setMusicVolume(volume);
+}
+
+void TownsEuphonyDriver::setSoundEffectVolume(int volume) {
+ _intf->setSoundEffectVolume(volume);
+}
+
void TownsEuphonyDriver::resetTables() {
memset(_tEnable, 0xff, 32);
memset(_tMode, 0xff, 16);