mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-19 11:17:49 +00:00
audio: Wait for samples on the emulated DSP side to avoid desyncs
Waiting on the host side is inaccurate and leads to desyncs in the event of the sink missing a deadline that require stalls to fix. By waiting for the sink to have space before even starting rendering such desyncs can be avoided.
This commit is contained in:
parent
7e7ad78aaf
commit
d3f0149af2
6 changed files with 28 additions and 24 deletions
|
@ -189,6 +189,8 @@ void AudioRenderer::ThreadFunc() {
|
|||
max_time = std::min(command_buffer.time_limit, max_time);
|
||||
command_list_processor.SetProcessTimeMax(max_time);
|
||||
|
||||
streams[index]->WaitFreeSpace();
|
||||
|
||||
// Process the command list
|
||||
{
|
||||
MICROPROFILE_SCOPE(Audio_Renderer);
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "common/common_types.h"
|
||||
#include "common/reader_writer_queue.h"
|
||||
#include "common/thread.h"
|
||||
#include "common/polyfill_thread.h"
|
||||
|
||||
namespace Core {
|
||||
namespace Timing {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue