From 301a554a690c2fb8d895812bc9e5953a39c76e75 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Fri, 20 Mar 2009 01:58:33 +0000 Subject: [PATCH] - Added an OutputVolume() call after the MusicVolumeChanged() call in MIDIStreamer::Play(). Since the state isn't playing yet when MusicVolumeChanged() is called, it doesn't do this itself. SVN r1491 (trunk) --- docs/rh-log.txt | 3 +++ src/sound/music_midistream.cpp | 1 + src/sound/music_win_mididevice.cpp | 6 +++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 5a773ab4b..ab2a8c166 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,7 @@ March 19, 2009 +- Added an OutputVolume() call after the MusicVolumeChanged() call in + MIDIStreamer::Play(). Since the state isn't playing yet when + MusicVolumeChanged() is called, it doesn't do this itself. - Fixed: P_RailAttack() passed the wrong angle variable to P_TraceBleed(). March 18, 2009 (Changes by Graf Zahl) diff --git a/src/sound/music_midistream.cpp b/src/sound/music_midistream.cpp index 8a73217d7..6771906a0 100644 --- a/src/sound/music_midistream.cpp +++ b/src/sound/music_midistream.cpp @@ -247,6 +247,7 @@ void MIDIStreamer::Play(bool looping, int subsong) } MusicVolumeChanged(); // set volume to current music's properties + OutputVolume(Volume); #ifdef _WIN32 ResetEvent(ExitEvent); diff --git a/src/sound/music_win_mididevice.cpp b/src/sound/music_win_mididevice.cpp index d8b02ca53..6a55855f3 100644 --- a/src/sound/music_win_mididevice.cpp +++ b/src/sound/music_win_mididevice.cpp @@ -215,11 +215,15 @@ void WinMIDIDevice::Stop() // Bit 14: Select drum set if 1, tone bank if 0 // // My old GUS PnP needed the instruments to be preloaded, or it would miss -// some notes the first time through the song. I doubt any modern +// some notes the first time through a song. I doubt any modern // hardware has this problem, but since I'd already written the code for // ZDoom 1.22 and below, I'm resurrecting it now for completeness, since I'm // using preloading for the internal Timidity. // +// NOTETOSELF: Why did I never notice the midiOutCache(Drum)Patches calls +// before now? Should I switch to them? This code worked on my GUS, but +// using the APIs intended for caching might be better. +// //========================================================================== void WinMIDIDevice::PrecacheInstruments(const WORD *instruments, int count)