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
d9a95b08
Commit
d9a95b08
authored
Dec 15, 2020
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some logging to context initialization.
Public issue
https://github.com/mackron/miniaudio/issues/247
parent
21e7c413
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
miniaudio.h
miniaudio.h
+11
-0
No files found.
miniaudio.h
View file @
d9a95b08
...
@@ -32592,6 +32592,7 @@ MA_API ma_result ma_context_init(const ma_backend backends[], ma_uint32 backendC
...
@@ -32592,6 +32592,7 @@ MA_API ma_result ma_context_init(const ma_backend backends[], ma_uint32 backendC
}
}
if (pContext->callbacks.onContextInit != NULL) {
if (pContext->callbacks.onContextInit != NULL) {
ma_post_log_messagef(pContext, NULL, MA_LOG_LEVEL_VERBOSE, "Attempting to initialize %s backend...", ma_get_backend_name(backend));
result = pContext->callbacks.onContextInit(pContext, pConfig, &pContext->callbacks);
result = pContext->callbacks.onContextInit(pContext, pConfig, &pContext->callbacks);
} else {
} else {
result = MA_NO_BACKEND;
result = MA_NO_BACKEND;
...
@@ -32619,12 +32620,14 @@ MA_API ma_result ma_context_init(const ma_backend backends[], ma_uint32 backendC
...
@@ -32619,12 +32620,14 @@ MA_API ma_result ma_context_init(const ma_backend backends[], ma_uint32 backendC
#ifdef MA_HAS_ALSA
#ifdef MA_HAS_ALSA
case ma_backend_alsa:
case ma_backend_alsa:
{
{
ma_post_log_message(pContext, NULL, MA_LOG_LEVEL_VERBOSE, "Attempting to initialize ALSA backend...");
result = ma_context_init__alsa(pConfig, pContext);
result = ma_context_init__alsa(pConfig, pContext);
} break;
} break;
#endif
#endif
#ifdef MA_HAS_PULSEAUDIO
#ifdef MA_HAS_PULSEAUDIO
case ma_backend_pulseaudio:
case ma_backend_pulseaudio:
{
{
ma_post_log_message(pContext, NULL, MA_LOG_LEVEL_VERBOSE, "Attempting to initialize PulseAudio backend...");
result = ma_context_init__pulse(pConfig, pContext);
result = ma_context_init__pulse(pConfig, pContext);
} break;
} break;
#endif
#endif
...
@@ -32637,36 +32640,42 @@ MA_API ma_result ma_context_init(const ma_backend backends[], ma_uint32 backendC
...
@@ -32637,36 +32640,42 @@ MA_API ma_result ma_context_init(const ma_backend backends[], ma_uint32 backendC
#ifdef MA_HAS_COREAUDIO
#ifdef MA_HAS_COREAUDIO
case ma_backend_coreaudio:
case ma_backend_coreaudio:
{
{
ma_post_log_message(pContext, NULL, MA_LOG_LEVEL_VERBOSE, "Attempting to initialize CoreAudio backend...");
result = ma_context_init__coreaudio(pConfig, pContext);
result = ma_context_init__coreaudio(pConfig, pContext);
} break;
} break;
#endif
#endif
#ifdef MA_HAS_SNDIO
#ifdef MA_HAS_SNDIO
case ma_backend_sndio:
case ma_backend_sndio:
{
{
ma_post_log_message(pContext, NULL, MA_LOG_LEVEL_VERBOSE, "Attempting to initialize sndio backend...");
result = ma_context_init__sndio(pConfig, pContext);
result = ma_context_init__sndio(pConfig, pContext);
} break;
} break;
#endif
#endif
#ifdef MA_HAS_AUDIO4
#ifdef MA_HAS_AUDIO4
case ma_backend_audio4:
case ma_backend_audio4:
{
{
ma_post_log_message(pContext, NULL, MA_LOG_LEVEL_VERBOSE, "Attempting to initialize audio(4) backend...");
result = ma_context_init__audio4(pConfig, pContext);
result = ma_context_init__audio4(pConfig, pContext);
} break;
} break;
#endif
#endif
#ifdef MA_HAS_OSS
#ifdef MA_HAS_OSS
case ma_backend_oss:
case ma_backend_oss:
{
{
ma_post_log_message(pContext, NULL, MA_LOG_LEVEL_VERBOSE, "Attempting to initialize OSS backend...");
result = ma_context_init__oss(pConfig, pContext);
result = ma_context_init__oss(pConfig, pContext);
} break;
} break;
#endif
#endif
#ifdef MA_HAS_AAUDIO
#ifdef MA_HAS_AAUDIO
case ma_backend_aaudio:
case ma_backend_aaudio:
{
{
ma_post_log_message(pContext, NULL, MA_LOG_LEVEL_VERBOSE, "Attempting to initialize AAudio backend...");
result = ma_context_init__aaudio(pConfig, pContext);
result = ma_context_init__aaudio(pConfig, pContext);
} break;
} break;
#endif
#endif
#ifdef MA_HAS_OPENSL
#ifdef MA_HAS_OPENSL
case ma_backend_opensl:
case ma_backend_opensl:
{
{
ma_post_log_message(pContext, NULL, MA_LOG_LEVEL_VERBOSE, "Attempting to initialize OpenSL backend...");
result = ma_context_init__opensl(pConfig, pContext);
result = ma_context_init__opensl(pConfig, pContext);
} break;
} break;
#endif
#endif
...
@@ -32714,6 +32723,8 @@ MA_API ma_result ma_context_init(const ma_backend backends[], ma_uint32 backendC
...
@@ -32714,6 +32723,8 @@ MA_API ma_result ma_context_init(const ma_backend backends[], ma_uint32 backendC
pContext->backend = backend;
pContext->backend = backend;
return result;
return result;
} else {
ma_post_log_messagef(pContext, NULL, MA_LOG_LEVEL_VERBOSE, "Failed to initialize %s backend.", ma_get_backend_name(backend));
}
}
}
}
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