Repository navigation
Conversation
Audio_HLE_PollDeferred also runs on Aurora's FIFO processor thread (via the producer wait callback) while the guest blocks in a FIFO drain. The thread_local cursor let each thread credit the same stall, and the extra blocks overflowed the 120 ms output queue as dropped blocks.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
What
ConsumeAudioPollDeltaMicroskept its last-poll time in athread_local, assuming every audio pump runs on the guest thread. That isn't true: when the guest blocks in a FIFO drain, the "Aurora FIFO processor" thread runsServiceGuestTimingDuringAuroraFrameWait→Audio_HLE_PollDeferredthrough aurora's producer wait callback. Each thread then credited the same stall (up to the 100 ms cap), the extra audio was pushed in a burst, andQueueHasCapacityLockeddropped the blocks that didn't fit in the 120 ms queue. Every dropped 3 ms block is a hard splice in the output.The cursor is now a single process-wide atomic, advanced with a CAS. The 100 ms cap and the sub-microsecond remainder behave as before, and a caller whose timestamp is already behind the cursor gets 0.
Testing
PAL,
--race-cpu, cold shader cache, recording what SDL actually sends to the device:output queue fullwarning in every run. Some runs had an audible splice during the race intro.This removes one source of race-start crackle. It doesn't cover dropouts from host stalls longer than the buffer, and I couldn't reproduce the online countdown reports locally, so this may not be the whole story for those.
Summary by CodeRabbit