Audio: Make default volume 100, and changed volume scale so that 100 is identical to the SPC's output.
This commit is contained in:
parent
bdc06f5dda
commit
d519c5bb86
3 changed files with 4 additions and 4 deletions
|
@ -103,7 +103,7 @@ struct AudioConfig
|
|||
bool EnableAudio = true;
|
||||
bool DisableDynamicSampleRate = false;
|
||||
|
||||
uint32_t MasterVolume = 25;
|
||||
uint32_t MasterVolume = 100;
|
||||
uint32_t SampleRate = 48000;
|
||||
uint32_t AudioLatency = 60;
|
||||
|
||||
|
|
|
@ -55,10 +55,10 @@ void SoundMixer::PlayAudioBuffer(int16_t* samples, uint32_t sampleCount)
|
|||
ProcessEqualizer(samples, sampleCount);
|
||||
}
|
||||
|
||||
if(cfg.MasterVolume != 25) {
|
||||
if(cfg.MasterVolume < 100) {
|
||||
//Apply volume if not using the default value
|
||||
for(uint32_t i = 0; i < sampleCount * 2; i++) {
|
||||
samples[i] = (int32_t)samples[i] * (int32_t)cfg.MasterVolume / 25;
|
||||
samples[i] = (int32_t)samples[i] * (int32_t)cfg.MasterVolume / 100;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace Mesen.GUI.Config
|
|||
[MarshalAs(UnmanagedType.I1)] public bool EnableAudio = true;
|
||||
[MarshalAs(UnmanagedType.I1)] public bool DisableDynamicSampleRate = false;
|
||||
|
||||
[MinMax(0, 100)] public UInt32 MasterVolume = 25;
|
||||
[MinMax(0, 100)] public UInt32 MasterVolume = 100;
|
||||
[ValidValues(11025, 22050, 32000, 44100, 48000, 96000)] public UInt32 SampleRate = 48000;
|
||||
[MinMax(15, 300)] public UInt32 AudioLatency = 60;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue