Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Marijn Suijten
pulseaudio
Commits
6f48bc95
Commit
6f48bc95
authored
Dec 20, 2019
by
ckdo
Committed by
Georg Chini
Dec 20, 2019
Browse files
raop: Allow channel map module argument
parent
c922e2c5
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/modules/raop/module-raop-sink.c
View file @
6f48bc95
...
...
@@ -58,6 +58,7 @@ static const char* const valid_modargs[] = {
"format"
,
"rate"
,
"channels"
,
"channel_map"
,
"username"
,
"password"
,
"latency_msec"
,
...
...
src/modules/raop/raop-sink.c
View file @
6f48bc95
...
...
@@ -554,6 +554,7 @@ static pa_card *raop_create_card(pa_module *m, pa_device_port *port, pa_card_pro
pa_sink
*
pa_raop_sink_new
(
pa_module
*
m
,
pa_modargs
*
ma
,
const
char
*
driver
)
{
struct
userdata
*
u
=
NULL
;
pa_sample_spec
ss
;
pa_channel_map
map
;
char
*
thread_name
=
NULL
;
const
char
*
server
,
*
protocol
,
*
encryption
,
*
codec
;
const
char
/* *username, */
*
password
;
...
...
@@ -567,8 +568,10 @@ pa_sink* pa_raop_sink_new(pa_module *m, pa_modargs *ma, const char *driver) {
pa_assert
(
ma
);
ss
=
m
->
core
->
default_sample_spec
;
if
(
pa_modargs_get_sample_spec
(
ma
,
&
ss
)
<
0
)
{
pa_log
(
"Failed to parse sample specification"
);
map
=
m
->
core
->
default_channel_map
;
if
(
pa_modargs_get_sample_spec_and_channel_map
(
ma
,
&
ss
,
&
map
,
PA_CHANNEL_MAP_DEFAULT
)
<
0
)
{
pa_log
(
"Invalid sample format specification or channel map"
);
goto
fail
;
}
...
...
@@ -668,6 +671,7 @@ pa_sink* pa_raop_sink_new(pa_module *m, pa_modargs *ma, const char *driver) {
}
pa_sink_new_data_set_sample_spec
(
&
data
,
&
ss
);
pa_sink_new_data_set_channel_map
(
&
data
,
&
map
);
pa_proplist_sets
(
data
.
proplist
,
PA_PROP_DEVICE_STRING
,
server
);
pa_proplist_sets
(
data
.
proplist
,
PA_PROP_DEVICE_INTENDED_ROLES
,
"music"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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