- 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.

This commit is contained in:
Christoph Oelckers 2018-02-23 17:27:36 +01:00
parent d25cc1baa0
commit 4a179954b1
3 changed files with 1 additions and 23 deletions

View file

@ -66,7 +66,6 @@ public:
MusInfo (); MusInfo ();
virtual ~MusInfo (); virtual ~MusInfo ();
virtual void MusicVolumeChanged(); // snd_musicvolume changed virtual void MusicVolumeChanged(); // snd_musicvolume changed
virtual void TimidityVolumeChanged(); // timidity_mastervolume changed
virtual void Play (bool looping, int subsong) = 0; virtual void Play (bool looping, int subsong) = 0;
virtual void Pause () = 0; virtual void Pause () = 0;
virtual void Resume () = 0; virtual void Resume () = 0;

View file

@ -14,8 +14,6 @@ void I_InitMusicWin32 ();
extern float relative_volume; extern float relative_volume;
class MIDISource; class MIDISource;
EXTERN_CVAR (Float, timidity_mastervolume)
// A device that provides a WinMM-like MIDI streaming interface ------------- // A device that provides a WinMM-like MIDI streaming interface -------------

View file

@ -85,16 +85,6 @@ TimidityPlus::Instruments *TimidityPPMIDIDevice::instruments;
CVAR(String, timidity_config, "timidity.cfg", CVAR_ARCHIVE | CVAR_GLOBALCONFIG) CVAR(String, timidity_config, "timidity.cfg", CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
// added because Timidity's output is rather loud. // 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) CUSTOM_CVAR (Int, timidity_frequency, 44100, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
{ // Clamp frequency to Timidity's limits { // 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) MIDIDevice *CreateTimidityPPMIDIDevice(const char *args)
{ {
return new TimidityPPMIDIDevice(args); return new TimidityPPMIDIDevice(args);