On Tue Nov 18 00:26:48 2025 +0000, Paul Gofman wrote:
The only place where send_sample_data() explicitly waits now in the running state is when get_write_pos() returns S_FALSE and that only happens due to DSoundRenderer_Max_Fill check. Then, that wait is 10ms wait of flush_event. Removing DSoundRenderer_Max_Fill will make setting that event a dead code (there is some handling in my later patch but that is a different aspect). It seems to me doing exactly that, just dropping that limit, makes send_sample_data() busy-loop waiting for output dsound buffer to get some space when full and this process is not aborted with flush_event? Unless I am missing something we can't just drop that logic without replacing it with something else entirely.
I think this will probably work if send_sample_data(), with dropped DSoundRenderer_Max_Fill will be waiting for 10ms on flush_event when either 'free' or locked buffer size is 0 (instead of depending on get_write_pos status which can be made void in this case).