diff options
Diffstat (limited to 'src/audio_core/renderer/system.cpp')
| -rw-r--r-- | src/audio_core/renderer/system.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/audio_core/renderer/system.cpp b/src/audio_core/renderer/system.cpp index d29754634..31f92087c 100644 --- a/src/audio_core/renderer/system.cpp +++ b/src/audio_core/renderer/system.cpp | |||
| @@ -684,11 +684,11 @@ u64 System::GenerateCommand(std::span<u8> in_command_buffer, | |||
| 684 | sink_context, splitter_context, perf_manager}; | 684 | sink_context, splitter_context, perf_manager}; |
| 685 | 685 | ||
| 686 | voice_context.SortInfo(); | 686 | voice_context.SortInfo(); |
| 687 | command_generator.GenerateVoiceCommands(); | ||
| 687 | 688 | ||
| 688 | const auto start_estimated_time{drop_voice_param * | 689 | const auto start_estimated_time{drop_voice_param * |
| 689 | static_cast<f32>(command_buffer.estimated_process_time)}; | 690 | static_cast<f32>(command_buffer.estimated_process_time)}; |
| 690 | 691 | ||
| 691 | command_generator.GenerateVoiceCommands(); | ||
| 692 | command_generator.GenerateSubMixCommands(); | 692 | command_generator.GenerateSubMixCommands(); |
| 693 | command_generator.GenerateFinalMixCommands(); | 693 | command_generator.GenerateFinalMixCommands(); |
| 694 | command_generator.GenerateSinkCommands(); | 694 | command_generator.GenerateSinkCommands(); |
| @@ -708,11 +708,13 @@ u64 System::GenerateCommand(std::span<u8> in_command_buffer, | |||
| 708 | 708 | ||
| 709 | const auto end_estimated_time{drop_voice_param * | 709 | const auto end_estimated_time{drop_voice_param * |
| 710 | static_cast<f32>(command_buffer.estimated_process_time)}; | 710 | static_cast<f32>(command_buffer.estimated_process_time)}; |
| 711 | |||
| 712 | const auto dsp_time_limit{((time_limit_percent / 100.0f) * 2'880'000.0f) * | ||
| 713 | (static_cast<f32>(render_time_limit_percent) / 100.0f)}; | ||
| 714 | |||
| 711 | const auto estimated_time{start_estimated_time - end_estimated_time}; | 715 | const auto estimated_time{start_estimated_time - end_estimated_time}; |
| 712 | 716 | ||
| 713 | const auto time_limit{static_cast<u32>( | 717 | const auto time_limit{static_cast<u32>(std::max(dsp_time_limit + estimated_time, 0.0f))}; |
| 714 | estimated_time + (((time_limit_percent / 100.0f) * 2'880'000.0) * | ||
| 715 | (static_cast<f32>(render_time_limit_percent) / 100.0f)))}; | ||
| 716 | num_voices_dropped = | 718 | num_voices_dropped = |
| 717 | DropVoices(command_buffer, static_cast<u32>(start_estimated_time), time_limit); | 719 | DropVoices(command_buffer, static_cast<u32>(start_estimated_time), time_limit); |
| 718 | } | 720 | } |