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
afb0029d
Commit
afb0029d
authored
Mar 11, 2018
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update the advanced config example.
parent
f455c4b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
+39
-0
examples/advanced_config.c
examples/advanced_config.c
+39
-0
No files found.
examples/advanced_config.c
View file @
afb0029d
...
@@ -34,6 +34,31 @@ int main(int argc, char** argv)
...
@@ -34,6 +34,31 @@ int main(int argc, char** argv)
// common configuration settings, but you can set other members for more detailed control.
// common configuration settings, but you can set other members for more detailed control.
mal_context_config
contextConfig
=
mal_context_config_init
(
on_log
);
mal_context_config
contextConfig
=
mal_context_config_init
(
on_log
);
// The priority of the worker thread can be set with the following. The default priority is
// mal_thread_priority_highest.
contextConfig
.
threadPriority
=
mal_thread_priority_normal
;
// PulseAudio
// ----------
// PulseAudio allows you to set the name of the application. mini_al exposes this through the following
// config.
contextConfig
.
pulse
.
pApplicationName
=
"My Application"
;
// PulseAudio also allows you to control the server you want to connect to, in which case you can specify
// it with the config below.
contextConfig
.
pulse
.
pServerName
=
"my_server"
;
// During initialization, PulseAudio can try to automatically start the PulseAudio daemon. This does not
// suit mini_al's trial and error backend initialization architecture so it's disabled by default, but you
// can enable it like so:
contextConfig
.
pulse
.
tryAutoSpawn
=
MAL_TRUE
;
// ALSA
// ----
// Typically, ALSA enumerates many devices, which unfortunately is not very friendly for the end user. To
// Typically, ALSA enumerates many devices, which unfortunately is not very friendly for the end user. To
// combat this, mini_al will include only unique card/device pairs by default. The problem with this is that
// combat this, mini_al will include only unique card/device pairs by default. The problem with this is that
// you lose a bit of flexibility and control. Setting alsa.useVerboseDeviceEnumeration makes it so the ALSA
// you lose a bit of flexibility and control. Setting alsa.useVerboseDeviceEnumeration makes it so the ALSA
...
@@ -43,6 +68,18 @@ int main(int argc, char** argv)
...
@@ -43,6 +68,18 @@ int main(int argc, char** argv)
// Typical installations of ALSA include a null device. The config below will exclude it from enumeration.
// Typical installations of ALSA include a null device. The config below will exclude it from enumeration.
contextConfig
.
alsa
.
excludeNullDevice
=
MAL_TRUE
;
contextConfig
.
alsa
.
excludeNullDevice
=
MAL_TRUE
;
// JACK
// ----
// Like PulseAudio, JACK allows you to specify the name of your application, which you can set like so:
contextConfig
.
jack
.
pClientName
=
"My Application"
;
// Also like PulseAudio, you can have JACK try to automatically start using the following:
contextConfig
.
jack
.
tryStartServer
=
MAL_TRUE
;
// The prioritization of backends can be controlled by the application. You need only specify the backends
// The prioritization of backends can be controlled by the application. You need only specify the backends
// you care about. If the context cannot be initialized for any of the specified backends mal_context_init()
// you care about. If the context cannot be initialized for any of the specified backends mal_context_init()
// will fail.
// will fail.
...
@@ -50,8 +87,10 @@ int main(int argc, char** argv)
...
@@ -50,8 +87,10 @@ int main(int argc, char** argv)
mal_backend_wasapi
,
// Higest priority.
mal_backend_wasapi
,
// Higest priority.
mal_backend_dsound
,
mal_backend_dsound
,
mal_backend_winmm
,
mal_backend_winmm
,
mal_backend_pulseaudio
,
mal_backend_alsa
,
mal_backend_alsa
,
mal_backend_oss
,
mal_backend_oss
,
mal_backend_jack
,
mal_backend_opensl
,
mal_backend_opensl
,
mal_backend_openal
,
mal_backend_openal
,
mal_backend_sdl
,
mal_backend_sdl
,
...
...
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