Auto Save: Prevent saves from starting an audio loop

This commit is contained in:
Souryo 2016-09-04 19:04:52 -04:00
parent 69f1ca010e
commit 3d453ba021
2 changed files with 3 additions and 2 deletions

View File

@ -310,10 +310,11 @@ void Console::Run()
bool paused = EmulationSettings::IsPaused();
if(paused && !_stop) {
MessageManager::SendNotification(ConsoleNotificationType::GamePaused);
_runLock.Release();
//Prevent audio from looping endlessly while game is paused
SoundMixer::StopAudio();
_runLock.Release();
PlatformUtilities::EnableScreensaver();
while(paused && !_stop) {

View File

@ -77,7 +77,7 @@ void SoundMixer::PlayAudioBuffer(uint32_t time)
{
EndFrame(time);
size_t sampleCount = blip_read_samples(_blipBuf, _outputBuffer, SoundMixer::MaxSamplesPerFrame, 0);
if(SoundMixer::AudioDevice) {
if(SoundMixer::AudioDevice && !EmulationSettings::IsPaused()) {
//Apply low pass filter/volume reduction when in background (based on options)
if(!_waveRecorder && !EmulationSettings::CheckFlag(EmulationFlags::NsfPlayerEnabled) && EmulationSettings::CheckFlag(EmulationFlags::InBackground)) {
if(EmulationSettings::CheckFlag(EmulationFlags::MuteSoundInBackground)) {