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
3f45def3
Commit
3f45def3
authored
Nov 18, 2017
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't use run-time linking of pthread on Android nor Emscripten.
parent
ce054406
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
mini_al.h
mini_al.h
+18
-0
No files found.
mini_al.h
View file @
3f45def3
...
@@ -1579,6 +1579,11 @@ void mal_pcm_convert(void* pOut, mal_format formatOut, const void* pIn, mal_form
...
@@ -1579,6 +1579,11 @@ void mal_pcm_convert(void* pOut, mal_format formatOut, const void* pIn, mal_form
#define MAL_HAS_NULL // Everything supports the null backend.
#define MAL_HAS_NULL // Everything supports the null backend.
#endif
#endif
// Disable run-time linking on certain backends.
#if defined(MAL_ANDROID) || defined(MAL_EMSCRIPTED)
#define MAL_NO_RUNTIME_LINKING
#endif
#ifdef MAL_WIN32
#ifdef MAL_WIN32
#define MAL_THREADCALL WINAPI
#define MAL_THREADCALL WINAPI
...
@@ -8485,6 +8490,7 @@ mal_result mal_context_uninit_backend_apis__nix(mal_context* pContext)
...
@@ -8485,6 +8490,7 @@ mal_result mal_context_uninit_backend_apis__nix(mal_context* pContext)
mal_result
mal_context_init_backend_apis__nix
(
mal_context
*
pContext
)
mal_result
mal_context_init_backend_apis__nix
(
mal_context
*
pContext
)
{
{
// pthread
// pthread
#if !defined(MAL_NO_RUNTIME_LINKING)
const
char
*
libpthreadFileNames
[]
=
{
const
char
*
libpthreadFileNames
[]
=
{
"libpthread.so"
,
"libpthread.so"
,
"libpthread.so.0"
,
"libpthread.so.0"
,
...
@@ -8512,6 +8518,18 @@ mal_result mal_context_init_backend_apis__nix(mal_context* pContext)
...
@@ -8512,6 +8518,18 @@ mal_result mal_context_init_backend_apis__nix(mal_context* pContext)
pContext
->
posix
.
pthread_cond_destroy
=
(
mal_proc
)
mal_dlsym
(
pContext
->
posix
.
pthreadSO
,
"pthread_cond_destroy"
);
pContext
->
posix
.
pthread_cond_destroy
=
(
mal_proc
)
mal_dlsym
(
pContext
->
posix
.
pthreadSO
,
"pthread_cond_destroy"
);
pContext
->
posix
.
pthread_cond_wait
=
(
mal_proc
)
mal_dlsym
(
pContext
->
posix
.
pthreadSO
,
"pthread_cond_wait"
);
pContext
->
posix
.
pthread_cond_wait
=
(
mal_proc
)
mal_dlsym
(
pContext
->
posix
.
pthreadSO
,
"pthread_cond_wait"
);
pContext
->
posix
.
pthread_cond_signal
=
(
mal_proc
)
mal_dlsym
(
pContext
->
posix
.
pthreadSO
,
"pthread_cond_signal"
);
pContext
->
posix
.
pthread_cond_signal
=
(
mal_proc
)
mal_dlsym
(
pContext
->
posix
.
pthreadSO
,
"pthread_cond_signal"
);
#else
pContext
->
posix
.
pthread_create
=
(
mal_proc
)
pthread_create
;
pContext
->
posix
.
pthread_join
=
(
mal_proc
)
pthread_join
;
pContext
->
posix
.
pthread_mutex_init
=
(
mal_proc
)
pthread_mutex_init
;
pContext
->
posix
.
pthread_mutex_destroy
=
(
mal_proc
)
pthread_mutex_destroy
;
pContext
->
posix
.
pthread_mutex_lock
=
(
mal_proc
)
pthread_mutex_lock
;
pContext
->
posix
.
pthread_mutex_unlock
=
(
mal_proc
)
pthread_mutex_unlock
;
pContext
->
posix
.
pthread_cond_init
=
(
mal_proc
)
pthread_cond_init
;
pContext
->
posix
.
pthread_cond_destroy
=
(
mal_proc
)
pthread_cond_destroy
;
pContext
->
posix
.
pthread_cond_wait
=
(
mal_proc
)
pthread_cond_wait
;
pContext
->
posix
.
pthread_cond_signal
=
(
mal_proc
)
pthread_cond_signal
;
#endif
return
MAL_SUCCESS
;
return
MAL_SUCCESS
;
}
}
...
...
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