mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-22 10:51:50 -05:00
Clear DSP buffer after each execution
This commit is contained in:
parent
1c1959eaeb
commit
ec6ddaf766
2 changed files with 11 additions and 0 deletions
|
@ -77,6 +77,7 @@ void AudioRenderer::Wait() {
|
|||
"{}, got {}",
|
||||
Message::RenderResponse, msg);
|
||||
}
|
||||
PostDSPClearCommandBuffer();
|
||||
}
|
||||
|
||||
void AudioRenderer::Send(Direction dir, u32 message) {
|
||||
|
@ -96,6 +97,14 @@ void AudioRenderer::SetCommandBuffer(s32 session_id, CpuAddr buffer, u64 size, u
|
|||
command_buffers[session_id].reset_buffer = reset;
|
||||
}
|
||||
|
||||
void AudioRenderer::PostDSPClearCommandBuffer() noexcept {
|
||||
for (auto& buffer : command_buffers) {
|
||||
buffer.buffer = 0;
|
||||
buffer.size = 0;
|
||||
buffer.reset_buffer = false;
|
||||
}
|
||||
}
|
||||
|
||||
u32 AudioRenderer::GetRemainCommandCount(s32 session_id) const noexcept {
|
||||
return command_buffers[session_id].remaining_command_count;
|
||||
}
|
||||
|
|
|
@ -85,6 +85,8 @@ private:
|
|||
*/
|
||||
void CreateSinkStreams();
|
||||
|
||||
void PostDSPClearCommandBuffer() noexcept;
|
||||
|
||||
/// Core system
|
||||
Core::System& system;
|
||||
/// The output sink the AudioRenderer will send samples to
|
||||
|
|
Loading…
Reference in a new issue