Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
miniaudio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
miniaudio
Commits
c25fe30a
Commit
c25fe30a
authored
Jan 18, 2022
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WASAPI: Handle AUDCLNT_E_BUFFER_ERROR when processing audio data.
Public issue
https://github.com/mackron/miniaudio/issues/410
parent
cb2e3a7c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
miniaudio.h
miniaudio.h
+2
-2
No files found.
miniaudio.h
View file @
c25fe30a
...
...
@@ -21964,7 +21964,7 @@ static ma_result ma_device_read__wasapi(ma_device* pDevice, void* pFrames, ma_ui
continue;
} else {
if (hr == MA_AUDCLNT_S_BUFFER_EMPTY) {
if (hr == MA_AUDCLNT_S_BUFFER_EMPTY
|| hr == MA_AUDCLNT_E_BUFFER_ERROR
) {
/*
No data is available. We need to wait for more. There's two situations to consider
here. The first is normal capture mode. If this times out it probably means the
...
...
@@ -22078,7 +22078,7 @@ static ma_result ma_device_write__wasapi(ma_device* pDevice, const void* pFrames
pDevice->wasapi.mappedBufferPlaybackCap = bufferSizeInFrames;
pDevice->wasapi.mappedBufferPlaybackLen = 0;
} else {
if (hr == MA_AUDCLNT_E_BUFFER_TOO_LARGE) {
if (hr == MA_AUDCLNT_E_BUFFER_TOO_LARGE
|| hr == MA_AUDCLNT_E_BUFFER_ERROR
) {
/* Not enough data available. We need to wait for more. */
if (WaitForSingleObject(pDevice->wasapi.hEventPlayback, MA_WASAPI_WAIT_TIMEOUT_MILLISECONDS) != WAIT_OBJECT_0) {
break; /* Wait failed. Probably timed out. */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment