From 4a179954b147d89255d162b6829028ad770edb04 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 23 Feb 2018 17:27:36 +0100 Subject: [PATCH] - removed Timidity_mastervolume CVAR. The reason why this was added got addressed at a lower level with the new code (i.e. the EXE's output was far too loud) and if there need to be adjustments to evening out the volume of the different MIDI synths it should be done in the data generation step, not as an added factor to the system volume of the track. --- src/sound/i_music.h | 1 - src/sound/i_musicinterns.h | 2 -- .../music_timiditypp_mididevice.cpp | 21 +------------------ 3 files changed, 1 insertion(+), 23 deletions(-) diff --git a/src/sound/i_music.h b/src/sound/i_music.h index a803409dc..9a7b0836b 100644 --- a/src/sound/i_music.h +++ b/src/sound/i_music.h @@ -66,7 +66,6 @@ public: MusInfo (); virtual ~MusInfo (); virtual void MusicVolumeChanged(); // snd_musicvolume changed - virtual void TimidityVolumeChanged(); // timidity_mastervolume changed virtual void Play (bool looping, int subsong) = 0; virtual void Pause () = 0; virtual void Resume () = 0; diff --git a/src/sound/i_musicinterns.h b/src/sound/i_musicinterns.h index b0b4c297a..b3dadb874 100644 --- a/src/sound/i_musicinterns.h +++ b/src/sound/i_musicinterns.h @@ -14,8 +14,6 @@ void I_InitMusicWin32 (); extern float relative_volume; class MIDISource; -EXTERN_CVAR (Float, timidity_mastervolume) - // A device that provides a WinMM-like MIDI streaming interface ------------- diff --git a/src/sound/mididevices/music_timiditypp_mididevice.cpp b/src/sound/mididevices/music_timiditypp_mididevice.cpp index fb2be1aed..a75a4e087 100644 --- a/src/sound/mididevices/music_timiditypp_mididevice.cpp +++ b/src/sound/mididevices/music_timiditypp_mididevice.cpp @@ -85,16 +85,6 @@ TimidityPlus::Instruments *TimidityPPMIDIDevice::instruments; CVAR(String, timidity_config, "timidity.cfg", CVAR_ARCHIVE | CVAR_GLOBALCONFIG) // added because Timidity's output is rather loud. -CUSTOM_CVAR (Float, timidity_mastervolume, 1.0f, CVAR_ARCHIVE|CVAR_GLOBALCONFIG) -{ - if (self < 0.f) - self = 0.f; - else if (self > 4.f) - self = 4.f; - if (currSong != NULL) - currSong->TimidityVolumeChanged(); -} - CUSTOM_CVAR (Int, timidity_frequency, 44100, CVAR_ARCHIVE|CVAR_GLOBALCONFIG) { // Clamp frequency to Timidity's limits @@ -226,19 +216,10 @@ void TimidityPPMIDIDevice::ComputeOutput(float *buffer, int len) //========================================================================== // -// TimidityPPMIDIDevice :: TimidityVolumeChanged +// // //========================================================================== -void TimidityPPMIDIDevice::TimidityVolumeChanged() -{ - if (Stream != NULL) - { - Stream->SetVolume(timidity_mastervolume); - } -} - - MIDIDevice *CreateTimidityPPMIDIDevice(const char *args) { return new TimidityPPMIDIDevice(args);