Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
cb942eeb
Commit
cb942eeb
authored
Mar 01, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output_init: moved code to audio_output_detect()
parent
af66f666
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
16 deletions
+26
-16
output_init.c
src/output_init.c
+26
-16
No files found.
src/output_init.c
View file @
cb942eeb
...
...
@@ -41,6 +41,27 @@
if(bp) str = bp->value; \
}
static
const
struct
audio_output_plugin
*
audio_output_detect
(
void
)
{
const
struct
audio_output_plugin
*
plugin
;
unsigned
i
;
g_warning
(
"Attempt to detect audio output device"
);
audio_output_plugins_for_each
(
plugin
,
i
)
{
if
(
plugin
->
test_default_device
==
NULL
)
continue
;
g_warning
(
"Attempting to detect a %s audio device"
,
plugin
->
name
);
if
(
ao_plugin_test_default_device
(
plugin
))
return
plugin
;
}
return
NULL
;
}
bool
audio_output_init
(
struct
audio_output
*
ao
,
const
struct
config_param
*
param
)
{
...
...
@@ -63,29 +84,18 @@ audio_output_init(struct audio_output *ao, const struct config_param *param)
"
\"
%s
\"
at line %i
\n
"
,
type
,
param
->
line
);
}
}
else
{
unsigned
i
;
g_warning
(
"No
\"
%s
\"
defined in config file
\n
"
,
CONF_AUDIO_OUTPUT
);
g_warning
(
"Attempt to detect audio output device
\n
"
);
audio_output_plugins_for_each
(
plugin
,
i
)
{
if
(
plugin
->
test_default_device
)
{
g_warning
(
"Attempting to detect a %s audio "
"device
\n
"
,
plugin
->
name
);
if
(
ao_plugin_test_default_device
(
plugin
))
{
g_warning
(
"Successfully detected a %s "
"audio device
\n
"
,
plugin
->
name
);
break
;
}
}
}
plugin
=
audio_output_detect
();
if
(
plugin
==
NULL
)
{
g_warning
(
"Unable to detect an audio device
\n
"
);
g_warning
(
"Unable to detect an audio device"
);
return
false
;
}
g_message
(
"Successfully detected a %s audio device"
,
plugin
->
name
);
name
=
"default detected output"
;
}
...
...
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