Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
wireplumber
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pkg
wireplumber
Commits
f789c4bc
Commit
f789c4bc
authored
5 years ago
by
George Kiagiadakis
Browse files
Options
Downloads
Patches
Plain Diff
link-algorithm: link mono inputs to all available target ports
This avoids hearing mono audio only on the left speaker
parent
3a4040dd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/module-pipewire/algorithms.c
+13
-1
13 additions, 1 deletion
modules/module-pipewire/algorithms.c
with
13 additions
and
1 deletion
modules/module-pipewire/algorithms.c
+
13
−
1
View file @
f789c4bc
...
...
@@ -33,6 +33,7 @@ multiport_link_create (
guint32
out_channel
,
in_channel
;
guint8
direction
;
guint
i
;
gboolean
link_all
=
FALSE
;
/* tuple format:
uint32 node_id;
...
...
@@ -63,6 +64,12 @@ multiport_link_create (
/* now loop over the out ports and figure out where they should be linked */
g_variant_get
(
src_data
,
"a(uuuy)"
,
&
iter
);
/* special case for mono inputs: link to all outputs,
since we don't support proper channel mapping yet */
if
(
g_variant_iter_n_children
(
iter
)
==
1
)
link_all
=
TRUE
;
while
(
g_variant_iter_loop
(
iter
,
"(uuuy)"
,
&
out_node_id
,
&
out_port_id
,
&
out_channel
,
&
direction
))
{
...
...
@@ -76,7 +83,8 @@ multiport_link_create (
/* the channel has to match, unless we don't have any information
on channel ordering on either side */
if
(
out_channel
==
in_channel
||
if
(
link_all
||
out_channel
==
in_channel
||
out_channel
==
SPA_AUDIO_CHANNEL_UNKNOWN
||
in_channel
==
SPA_AUDIO_CHANNEL_UNKNOWN
)
{
...
...
@@ -98,6 +106,10 @@ multiport_link_create (
/* and the link */
create_link_cb
(
props
,
user_data
);
/* continue to link all input ports, if requested */
if
(
link_all
)
continue
;
/* and remove the linked input port from the array */
g_ptr_array_remove_index
(
in_ports
,
i
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment