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
a0668a89
Commit
a0668a89
authored
Jul 30, 2018
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up to the sndio backend.
parent
4da8834a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
10 deletions
+6
-10
mini_al.h
mini_al.h
+6
-10
No files found.
mini_al.h
View file @
a0668a89
...
...
@@ -15571,7 +15571,12 @@ mal_result mal_device_init__sndio(mal_context* pContext, mal_device_type deviceT
mal_assert(pDevice != NULL);
mal_zero_object(&pDevice->sndio);
const char* deviceName = MAL_SIO_DEVANY;
const char* deviceName;
#if defined(__FreeBSD__) || defined(__DragonFly__)
deviceName = "rsnd/0";
#else
deviceName = MAL_SIO_DEVANY;
#endif
if (pDeviceID != NULL) {
deviceName = pDeviceID->sndio;
}
...
...
@@ -15715,15 +15720,6 @@ mal_result mal_device_init__sndio(mal_context* pContext, mal_device_type deviceT
return mal_post_error(pDevice, MAL_LOG_LEVEL_ERROR, "[sndio] Failed to allocate memory for intermediary buffer.", MAL_OUT_OF_MEMORY);
}
// Make sure the device is put into a waiting state. It won't be started for real until audio is delivered. This
// is also called in start_backend(), however this is not a mistake. With the way mini_al works, if we don't put
// this here it's possible for sio_stop() to be called before sio_start() which causes sndio to put the handle
// into an EOF state which then causes everything thereafter to fail.
if (((mal_sio_start_proc)pDevice->pContext->sndio.sio_start)((struct mal_sio_hdl*)pDevice->sndio.handle) == 0) {
((mal_sio_close_proc)pContext->sndio.sio_close)((struct mal_sio_hdl*)pDevice->sndio.handle);
return mal_post_error(pDevice, MAL_LOG_LEVEL_ERROR, "[sndio] Failed to start backend device.", MAL_FAILED_TO_START_BACKEND_DEVICE);
}
#ifdef MAL_DEBUG_OUTPUT
printf("DEVICE INFO\n");
printf(" Format: %s\n", mal_get_format_name(pDevice->internalFormat));
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