NSF: Always keep sound turned on (at normal volume) when playing NSF files
This commit is contained in:
parent
72ba4b5eb1
commit
fce19f88fd
3 changed files with 4 additions and 1 deletions
|
@ -34,6 +34,7 @@ enum EmulationFlags
|
|||
SilenceTriangleHighFreq = 0x100000,
|
||||
|
||||
InBackground = 0x40000000,
|
||||
NsfPlayerEnabled = 0x80000000,
|
||||
};
|
||||
|
||||
enum class AudioChannel
|
||||
|
|
|
@ -10,6 +10,7 @@ NsfMapper::NsfMapper()
|
|||
_instance = this;
|
||||
EmulationSettings::DisableOverclocking(true);
|
||||
EmulationSettings::ClearFlags(EmulationFlags::Paused);
|
||||
EmulationSettings::SetFlags(EmulationFlags::NsfPlayerEnabled);
|
||||
}
|
||||
|
||||
NsfMapper::~NsfMapper()
|
||||
|
@ -17,6 +18,7 @@ NsfMapper::~NsfMapper()
|
|||
if(_instance == this) {
|
||||
_instance = nullptr;
|
||||
EmulationSettings::DisableOverclocking(false);
|
||||
EmulationSettings::ClearFlags(EmulationFlags::NsfPlayerEnabled);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ void SoundMixer::PlayAudioBuffer(uint32_t time)
|
|||
size_t sampleCount = blip_read_samples(_blipBuf, _outputBuffer, SoundMixer::MaxSamplesPerFrame, 0);
|
||||
if(SoundMixer::AudioDevice) {
|
||||
//Apply low pass filter/volume reduction when in background (based on options)
|
||||
if(!_waveRecorder && EmulationSettings::CheckFlag(EmulationFlags::InBackground)) {
|
||||
if(!_waveRecorder && !EmulationSettings::CheckFlag(EmulationFlags::NsfPlayerEnabled) && EmulationSettings::CheckFlag(EmulationFlags::InBackground)) {
|
||||
if(EmulationSettings::CheckFlag(EmulationFlags::MuteSoundInBackground)) {
|
||||
_lowPassFilter.ApplyFilter(_outputBuffer, sampleCount, 0, 0);
|
||||
} else if(EmulationSettings::CheckFlag(EmulationFlags::ReduceSoundInBackground)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue