Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WASAPI_WaitDevice: Check current padding before waiting on event #9708

Merged
merged 1 commit into from May 17, 2024

Conversation

0x1F9F1
Copy link
Collaborator

@0x1F9F1 0x1F9F1 commented May 6, 2024

During playback, don't queue another buffer if we already have maxpadding.
During capture, keep reading buffers until there are none left.

WASAPI_CaptureFromDevice only processes one buffer, and if we always wait on the next event, we will never catch up if it falls behind.

Fixes #9700

During playback, don't queue another buffer unless there are none in the queue.

During capture, there may be multiple buffers of audio available.
WASAPI_CaptureFromDevice only processes one buffer, and if we always wait on the next event, we will never catch up if it falls behind.
@0x1F9F1 0x1F9F1 marked this pull request as ready for review May 7, 2024 14:57
@sezero sezero requested a review from icculus May 13, 2024 08:46
@0x1F9F1 0x1F9F1 merged commit 09fbb2a into libsdl-org:main May 17, 2024
38 checks passed
@0x1F9F1 0x1F9F1 deleted the wasapi_waitdevice branch May 17, 2024 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Audio capture: the state or buffer may be wrong if there is a pause or other trigger
1 participant