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
bf64bc79
Commit
bf64bc79
authored
Nov 20, 2022
by
thedmd
Committed by
David Reid
Nov 20, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add MA_NO_DLOPEN to disable `ma_dlopen` implementation.
parent
9beb89c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
1 deletion
+28
-1
miniaudio.h
miniaudio.h
+28
-1
No files found.
miniaudio.h
View file @
bf64bc79
...
@@ -17422,13 +17422,22 @@ DEVICE I/O
...
@@ -17422,13 +17422,22 @@ DEVICE I/O
#ifdef MA_POSIX
#ifdef MA_POSIX
#include <sys/types.h>
#include <sys/types.h>
#include <unistd.h>
#include <unistd.h>
#endif
#ifndef MA_NO_DLOPEN
#if defined(MA_POSIX) && (defined(MA_ORBIS) || defined(MA_PROSPERO))
#define MA_NO_DLOPEN
#endif
#endif
#ifndef MA_NO_DLOPEN
#include <dlfcn.h>
#include <dlfcn.h>
#endif
#endif
/* Disable run-time linking on certain backends. */
/* Disable run-time linking on certain backends. */
#ifndef MA_NO_RUNTIME_LINKING
#ifndef MA_NO_RUNTIME_LINKING
#if defined(MA_EMSCRIPTEN)
#if defined(MA_
NO_DLOPEN) || defined(MA_
EMSCRIPTEN)
#define MA_NO_RUNTIME_LINKING
#define MA_NO_RUNTIME_LINKING
#endif
#endif
#endif
#endif
...
@@ -17968,6 +17977,7 @@ Dynamic Linking
...
@@ -17968,6 +17977,7 @@ Dynamic Linking
*******************************************************************************/
*******************************************************************************/
MA_API ma_handle ma_dlopen(ma_context* pContext, const char* filename)
MA_API ma_handle ma_dlopen(ma_context* pContext, const char* filename)
{
{
#ifndef MA_NO_DLOPEN
ma_handle handle;
ma_handle handle;
ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, "Loading library: %s\n", filename);
ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, "Loading library: %s\n", filename);
...
@@ -17999,10 +18009,16 @@ MA_API ma_handle ma_dlopen(ma_context* pContext, const char* filename)
...
@@ -17999,10 +18009,16 @@ MA_API ma_handle ma_dlopen(ma_context* pContext, const char* filename)
(void)pContext; /* It's possible for pContext to be unused. */
(void)pContext; /* It's possible for pContext to be unused. */
return handle;
return handle;
#else
(void)pContext;
(void)filename;
return NULL;
#endif
}
}
MA_API void ma_dlclose(ma_context* pContext, ma_handle handle)
MA_API void ma_dlclose(ma_context* pContext, ma_handle handle)
{
{
#ifndef MA_NO_DLOPEN
#ifdef _WIN32
#ifdef _WIN32
FreeLibrary((HMODULE)handle);
FreeLibrary((HMODULE)handle);
#else
#else
...
@@ -18010,10 +18026,15 @@ MA_API void ma_dlclose(ma_context* pContext, ma_handle handle)
...
@@ -18010,10 +18026,15 @@ MA_API void ma_dlclose(ma_context* pContext, ma_handle handle)
#endif
#endif
(void)pContext;
(void)pContext;
#else
(void)pContext;
(void)handle;
#endif
}
}
MA_API ma_proc ma_dlsym(ma_context* pContext, ma_handle handle, const char* symbol)
MA_API ma_proc ma_dlsym(ma_context* pContext, ma_handle handle, const char* symbol)
{
{
#ifndef MA_NO_DLOPEN
ma_proc proc;
ma_proc proc;
ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, "Loading symbol: %s\n", symbol);
ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, "Loading symbol: %s\n", symbol);
...
@@ -18037,6 +18058,12 @@ MA_API ma_proc ma_dlsym(ma_context* pContext, ma_handle handle, const char* symb
...
@@ -18037,6 +18058,12 @@ MA_API ma_proc ma_dlsym(ma_context* pContext, ma_handle handle, const char* symb
(void)pContext; /* It's possible for pContext to be unused. */
(void)pContext; /* It's possible for pContext to be unused. */
return proc;
return proc;
#else
(void)pContext;
(void)handle;
(void)symbol;
return NULL;
#endif
}
}
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