Auto Save: Prevent saves from starting an audio loop
This commit is contained in:
parent
69f1ca010e
commit
3d453ba021
2 changed files with 3 additions and 2 deletions
|
@ -310,10 +310,11 @@ void Console::Run()
|
||||||
bool paused = EmulationSettings::IsPaused();
|
bool paused = EmulationSettings::IsPaused();
|
||||||
if(paused && !_stop) {
|
if(paused && !_stop) {
|
||||||
MessageManager::SendNotification(ConsoleNotificationType::GamePaused);
|
MessageManager::SendNotification(ConsoleNotificationType::GamePaused);
|
||||||
_runLock.Release();
|
|
||||||
|
|
||||||
//Prevent audio from looping endlessly while game is paused
|
//Prevent audio from looping endlessly while game is paused
|
||||||
SoundMixer::StopAudio();
|
SoundMixer::StopAudio();
|
||||||
|
|
||||||
|
_runLock.Release();
|
||||||
|
|
||||||
PlatformUtilities::EnableScreensaver();
|
PlatformUtilities::EnableScreensaver();
|
||||||
while(paused && !_stop) {
|
while(paused && !_stop) {
|
||||||
|
|
|
@ -77,7 +77,7 @@ void SoundMixer::PlayAudioBuffer(uint32_t time)
|
||||||
{
|
{
|
||||||
EndFrame(time);
|
EndFrame(time);
|
||||||
size_t sampleCount = blip_read_samples(_blipBuf, _outputBuffer, SoundMixer::MaxSamplesPerFrame, 0);
|
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)
|
//Apply low pass filter/volume reduction when in background (based on options)
|
||||||
if(!_waveRecorder && !EmulationSettings::CheckFlag(EmulationFlags::NsfPlayerEnabled) && EmulationSettings::CheckFlag(EmulationFlags::InBackground)) {
|
if(!_waveRecorder && !EmulationSettings::CheckFlag(EmulationFlags::NsfPlayerEnabled) && EmulationSettings::CheckFlag(EmulationFlags::InBackground)) {
|
||||||
if(EmulationSettings::CheckFlag(EmulationFlags::MuteSoundInBackground)) {
|
if(EmulationSettings::CheckFlag(EmulationFlags::MuteSoundInBackground)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue