[Scummvm-cvs-logs] SF.net SVN: scummvm:[35792] scummvm/trunk/engines/groovie
spookypeanut at users.sourceforge.net
spookypeanut at users.sourceforge.net
Fri Jan 9 00:01:34 CET 2009
Revision: 35792
http://scummvm.svn.sourceforge.net/scummvm/?rev=35792&view=rev
Author: spookypeanut
Date: 2009-01-08 23:01:34 +0000 (Thu, 08 Jan 2009)
Log Message:
-----------
T7G: Reset midi volume to 100 on starting a track, cleanup
Modified Paths:
--------------
scummvm/trunk/engines/groovie/music.cpp
scummvm/trunk/engines/groovie/music.h
Modified: scummvm/trunk/engines/groovie/music.cpp
===================================================================
--- scummvm/trunk/engines/groovie/music.cpp 2009-01-08 22:41:25 UTC (rev 35791)
+++ scummvm/trunk/engines/groovie/music.cpp 2009-01-08 23:01:34 UTC (rev 35792)
@@ -174,6 +174,14 @@
_fadingEndVolume = 100;
}
+void MusicPlayer::endTrack() {
+ debugC(1, kGroovieDebugMIDI | kGroovieDebugAll, "Groovie::Music: End of song");
+ unload();
+ if (_backgroundFileRef) {
+ play(_backgroundFileRef, true);
+ }
+}
+
void MusicPlayer::applyFading() {
Common::StackLock lock(_mutex);
@@ -182,6 +190,7 @@
if (time >= _fadingDuration) {
// If we were fading to 0, stop the playback and restore the volume
if (_fadingEndVolume == 0) {
+ debugC(1, kGroovieDebugMIDI | kGroovieDebugAll, "Groovie::Music: Faded to zero: end of song");
unload();
_fadingEndVolume = 100;
}
@@ -221,6 +230,7 @@
// Set the looping option
_midiParser->property(MidiParser::mpAutoLoop, loop);
+ _gameVolume = 100;
// Load the new file
return load(fileref);
@@ -334,10 +344,7 @@
switch (type) {
case 0x2F:
// End of Track, play the background song
- debugC(1, kGroovieDebugMIDI | kGroovieDebugAll, "Groovie::Music: End of song");
- if (_backgroundFileRef) {
- play(_backgroundFileRef, true);
- }
+ endTrack();
break;
default:
_driver->metaEvent(type, data, length);
Modified: scummvm/trunk/engines/groovie/music.h
===================================================================
--- scummvm/trunk/engines/groovie/music.h 2009-01-08 22:41:25 UTC (rev 35791)
+++ scummvm/trunk/engines/groovie/music.h 2009-01-08 23:01:34 UTC (rev 35792)
@@ -56,6 +56,7 @@
uint16 _fadingStartVolume;
uint16 _fadingEndVolume;
uint16 _fadingDuration;
+ void endTrack();
void applyFading();
// Song volumes
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