audio_core: Only perform audio stretching if below full speed. (#7201)

This commit is contained in:
Steveice10
2023-11-26 12:06:59 -08:00
committed by GitHub
parent c0ecdb689d
commit 670e9936a4
13 changed files with 83 additions and 52 deletions

View File

@ -354,6 +354,10 @@ PerfStats::Results System::GetAndResetPerfStats() {
: PerfStats::Results{};
}
PerfStats::Results System::GetLastPerfStats() {
return perf_stats ? perf_stats->GetLastStats() : PerfStats::Results{};
}
void System::Reschedule() {
if (!reschedule_pending) {
return;
@ -408,10 +412,10 @@ System::ResultStatus System::Init(Frontend::EmuWindow& emu_window,
const auto audio_emulation = Settings::values.audio_emulation.GetValue();
if (audio_emulation == Settings::AudioEmulation::HLE) {
dsp_core = std::make_unique<AudioCore::DspHle>(*memory, *timing);
dsp_core = std::make_unique<AudioCore::DspHle>(*this);
} else {
const bool multithread = audio_emulation == Settings::AudioEmulation::LLEMultithreaded;
dsp_core = std::make_unique<AudioCore::DspLle>(*memory, *timing, multithread);
dsp_core = std::make_unique<AudioCore::DspLle>(*this, multithread);
}
memory->SetDSP(*dsp_core);