mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-23 10:09:22 +01:00
Fixed realtime audio not working correctly at emulation speeds over 100%
This commit is contained in:
parent
335fedaffe
commit
37e46358ea
@ -419,7 +419,8 @@ void DspHle::Impl::AudioTickCallback(s64 cycles_late) {
|
|||||||
// Reschedule recurrent event
|
// Reschedule recurrent event
|
||||||
const double time_scale =
|
const double time_scale =
|
||||||
Settings::values.enable_realtime_audio
|
Settings::values.enable_realtime_audio
|
||||||
? std::clamp(Core::System::GetInstance().GetStableFrameTimeScale(), 1.0, 3.0)
|
? std::clamp(Core::System::GetInstance().GetStableFrameTimeScale(),
|
||||||
|
100. / Settings::values.frame_limit.GetValue(), 3.0)
|
||||||
: 1.0;
|
: 1.0;
|
||||||
s64 adjusted_ticks = static_cast<s64>(audio_frame_ticks / time_scale - cycles_late);
|
s64 adjusted_ticks = static_cast<s64>(audio_frame_ticks / time_scale - cycles_late);
|
||||||
core_timing.ScheduleEvent(adjusted_ticks, tick_event);
|
core_timing.ScheduleEvent(adjusted_ticks, tick_event);
|
||||||
|
Loading…
Reference in New Issue
Block a user