[Scummvm-cvs-logs] SF.net SVN: scummvm:[52738] scummvm/trunk/engines/draci/music.cpp

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Thu Sep 16 00:30:01 CEST 2010


Revision: 52738
          http://scummvm.svn.sourceforge.net/scummvm/?rev=52738&view=rev
Author:   lordhoto
Date:     2010-09-15 22:30:00 +0000 (Wed, 15 Sep 2010)

Log Message:
-----------
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).

Modified Paths:
--------------
    scummvm/trunk/engines/draci/music.cpp

Modified: scummvm/trunk/engines/draci/music.cpp
===================================================================
--- scummvm/trunk/engines/draci/music.cpp	2010-09-15 22:00:43 UTC (rev 52737)
+++ scummvm/trunk/engines/draci/music.cpp	2010-09-15 22:30:00 UTC (rev 52738)
@@ -38,7 +38,7 @@
 
 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;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list