mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
channelmix: always copy the target channelmap
This commit is contained in:
parent
c5ac48c5f4
commit
95e2ec9f72
1 changed files with 4 additions and 3 deletions
|
|
@ -210,6 +210,10 @@ static int remap_volumes(struct props *p, const struct spa_audio_info *info)
|
||||||
float s;
|
float s;
|
||||||
uint32_t i, target = info->info.raw.channels;
|
uint32_t i, target = info->info.raw.channels;
|
||||||
|
|
||||||
|
p->n_channels = target;
|
||||||
|
for (i = 0; i < p->n_channels; i++)
|
||||||
|
p->channel_map[i] = info->info.raw.position[i];
|
||||||
|
|
||||||
if (target == 0 || p->n_channel_volumes == target)
|
if (target == 0 || p->n_channel_volumes == target)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
@ -224,9 +228,6 @@ static int remap_volumes(struct props *p, const struct spa_audio_info *info)
|
||||||
p->n_channel_volumes = target;
|
p->n_channel_volumes = target;
|
||||||
for (i = 0; i < p->n_channel_volumes; i++)
|
for (i = 0; i < p->n_channel_volumes; i++)
|
||||||
p->channel_volumes[i] = s;
|
p->channel_volumes[i] = s;
|
||||||
p->n_channels = target;
|
|
||||||
for (i = 0; i < p->n_channels; i++)
|
|
||||||
p->channel_map[i] = info->info.raw.position[i];
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue