aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2010-09-15 22:30:00 +0000
committerJohannes Schickel2010-09-15 22:30:00 +0000
commitb2c57117fd0749f0c39dbe6b9de65d2c0566ea1d (patch)
tree9345c6f987ceaef98190e98961386c6bb57faacc
parentb9a74a7915246c57a43c8999c4d29f534bfe4cf1 (diff)
downloadscummvm-rg350-b2c57117fd0749f0c39dbe6b9de65d2c0566ea1d.tar.gz
scummvm-rg350-b2c57117fd0749f0c39dbe6b9de65d2c0566ea1d.tar.bz2
scummvm-rg350-b2c57117fd0749f0c39dbe6b9de65d2c0566ea1d.zip
DRACI: Initialize MIDI channel volume properly.
This fixes bug #3067148 "DRACI: Volume range not respected". It seems Draci's MIDI files do not setup the channel volume properly before using the channels, but rely on having the maxed out. Since formerly the channel volume was initialized to 255, it caused the channel volume to be zero in case the user used 128 for his volume settings (128*255/255=128, and MIDI volume goes from 0-127). svn-id: r52738
-rw-r--r--engines/draci/music.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/draci/music.cpp b/engines/draci/music.cpp
index 509bf90121..95b7ae08da 100644
--- a/engines/draci/music.cpp
+++ b/engines/draci/music.cpp
@@ -38,7 +38,7 @@ namespace Draci {
MusicPlayer::MusicPlayer(MidiDriver *driver, const char *pathMask) : _parser(0), _driver(driver), _pathMask(pathMask), _looping(false), _isPlaying(false), _passThrough(false), _isGM(false), _track(-1) {
memset(_channel, 0, sizeof(_channel));
- memset(_channelVolume, 255, sizeof(_channelVolume));
+ memset(_channelVolume, 127, sizeof(_channelVolume));
_masterVolume = 0;
_smfParser = MidiParser::createParser_SMF();
_midiMusicData = NULL;