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
2a0dcf28
Commit
2a0dcf28
authored
Mar 08, 2018
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up.
parent
81ca0ccb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
mini_al.h
mini_al.h
+10
-2
No files found.
mini_al.h
View file @
2a0dcf28
...
...
@@ -11985,6 +11985,14 @@ static const mal_backend g_malDefaultBackends[] = {
mal_backend_null
};
static
mal_bool32
mal_is_backend_asynchronous
(
mal_backend
backend
)
{
return
backend
==
mal_backend_jack
||
backend
==
mal_backend_opensl
||
backend
==
mal_backend_sdl
;
}
mal_result
mal_context_init
(
const
mal_backend
backends
[],
mal_uint32
backendCount
,
const
mal_context_config
*
pConfig
,
mal_context
*
pContext
)
{
if
(
pContext
==
NULL
)
return
MAL_INVALID_ARGS
;
...
...
@@ -12518,7 +12526,7 @@ mal_result mal_device_init(mal_context* pContext, mal_device_type type, mal_devi
// Some backends don't require the worker thread.
if
(
pContext
->
backend
!=
mal_backend_jack
&&
pContext
->
backend
!=
mal_backend_opensl
&&
pContext
->
backend
!=
mal_backend_sdl
)
{
if
(
mal_is_backend_asynchronous
(
pContext
->
backend
)
)
{
// The worker thread.
if
(
mal_thread_create
(
pContext
,
&
pDevice
->
thread
,
mal_worker_thread
,
pDevice
)
!=
MAL_SUCCESS
)
{
mal_device_uninit
(
pDevice
);
...
...
@@ -12586,7 +12594,7 @@ void mal_device_uninit(mal_device* pDevice)
mal_device__set_state
(
pDevice
,
MAL_STATE_UNINITIALIZED
);
// Wake up the worker thread and wait for it to properly terminate.
if
(
pDevice
->
pContext
->
backend
!=
mal_backend_jack
&&
pDevice
->
pContext
->
backend
!=
mal_backend_opensl
&&
pDevice
->
pContext
->
backend
!=
mal_backend_sdl
)
{
if
(
mal_is_backend_asynchronous
(
pDevice
->
pContext
->
backend
)
)
{
mal_event_signal
(
&
pDevice
->
wakeupEvent
);
mal_thread_wait
(
&
pDevice
->
thread
);
}
...
...
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