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
c72a79f2
Commit
c72a79f2
authored
Jul 15, 2018
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up for asynchronous backends.
parent
73af94d2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
51 deletions
+4
-51
mini_al.h
mini_al.h
+4
-51
No files found.
mini_al.h
View file @
c72a79f2
...
@@ -18659,38 +18659,10 @@ mal_result mal_device_start(mal_device* pDevice)
...
@@ -18659,38 +18659,10 @@ mal_result mal_device_start(mal_device* pDevice)
// Asynchronous backends need to be handled differently.
// Asynchronous backends need to be handled differently.
if (mal_context_is_backend_asynchronous(pDevice->pContext)) {
if (mal_context_is_backend_asynchronous(pDevice->pContext)) {
#ifdef MAL_HAS_JACK
if (pDevice->pContext->backend == mal_backend_jack) {
result = pDevice->pContext->onDeviceStart(pDevice);
if (result == MAL_SUCCESS) {
mal_device__set_state(pDevice, MAL_STATE_STARTED);
}
}
#endif
#ifdef MAL_HAS_COREAUDIO
if (pDevice->pContext->backend == mal_backend_coreaudio) {
result = pDevice->pContext->onDeviceStart(pDevice);
if (result == MAL_SUCCESS) {
mal_device__set_state(pDevice, MAL_STATE_STARTED);
}
}
#endif
#ifdef MAL_HAS_OPENSL
if (pDevice->pContext->backend == mal_backend_opensl) {
result = pDevice->pContext->onDeviceStart(pDevice);
result = pDevice->pContext->onDeviceStart(pDevice);
if (result == MAL_SUCCESS) {
if (result == MAL_SUCCESS) {
mal_device__set_state(pDevice, MAL_STATE_STARTED);
mal_device__set_state(pDevice, MAL_STATE_STARTED);
}
}
}
#endif
#ifdef MAL_HAS_SDL
if (pDevice->pContext->backend == mal_backend_sdl) {
result = pDevice->pContext->onDeviceStart(pDevice);
if (result == MAL_SUCCESS) {
mal_device__set_state(pDevice, MAL_STATE_STARTED);
}
}
#endif
} else {
} else {
// Synchronous backends are started by signaling an event that's being waited on in the worker thread. We first wake up the
// Synchronous backends are started by signaling an event that's being waited on in the worker thread. We first wake up the
// thread and then wait for the start event.
// thread and then wait for the start event.
...
@@ -18738,26 +18710,7 @@ mal_result mal_device_stop(mal_device* pDevice)
...
@@ -18738,26 +18710,7 @@ mal_result mal_device_stop(mal_device* pDevice)
// Asynchronous backends need to be handled differently.
// Asynchronous backends need to be handled differently.
if (mal_context_is_backend_asynchronous(pDevice->pContext)) {
if (mal_context_is_backend_asynchronous(pDevice->pContext)) {
#ifdef MAL_HAS_JACK
if (pDevice->pContext->backend == mal_backend_jack) {
pDevice->pContext->onDeviceStop(pDevice);
pDevice->pContext->onDeviceStop(pDevice);
}
#endif
#ifdef MAL_HAS_COREAUDIO
if (pDevice->pContext->backend == mal_backend_coreaudio) {
pDevice->pContext->onDeviceStop(pDevice);
}
#endif
#ifdef MAL_HAS_OPENSL
if (pDevice->pContext->backend == mal_backend_opensl) {
pDevice->pContext->onDeviceStop(pDevice);
}
#endif
#ifdef MAL_HAS_SDL
if (pDevice->pContext->backend == mal_backend_sdl) {
pDevice->pContext->onDeviceStop(pDevice);
}
#endif
} else {
} else {
// Synchronous backends.
// Synchronous backends.
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