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
d8fc3f403b
commit
ea5dd02db9
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 {
|
||||
|
|
|
|||
Reference in a new issue