Add 'Use Alternative Audio Hook' option, enable by default

This commit is contained in:
DarthMew 2023-10-01 00:22:22 +02:00
commit afb6bc73c7
6 changed files with 55 additions and 8 deletions

View file

@ -697,6 +697,12 @@ void LibretroHostInterface::retro_run_frame()
UpdateGeometry();
m_display->Render();
if (g_settings.audio_fast_hook)
{
auto* const audio_stream = dynamic_cast<LibretroAudioStream*>(m_audio_stream.get());
audio_stream->UploadToFrontend();
}
}
unsigned LibretroHostInterface::retro_get_region()
@ -1153,6 +1159,12 @@ void LibretroHostInterface::UpdateSettings()
g_settings.gpu_use_software_renderer_for_readbacks = old_settings.gpu_use_software_renderer_for_readbacks;
}
if (g_settings.audio_fast_hook != old_settings.audio_fast_hook)
{
ReportFormattedMessage("Changing audio hook will apply on core reload.");
g_settings.audio_fast_hook = old_settings.audio_fast_hook;
}
}
CheckForSettingsChanges(old_settings);