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
This commit is contained in:
Johannes Schickel 2010-09-15 22:30:00 +00:00
parent b9a74a7915
commit b2c57117fd

View file

@ -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;