Pipewireパッケージ(ちょっと変更)
Revisão | ee8cb6aa67e20947b771558ba81c3dd02f3163d4 (tree) |
---|---|
Hora | 2023-09-27 23:10:56 |
Autor | Wim Taymans <wtaymans@redh...> |
Commiter | Wim Taymans |
filter-chain: fix gain when mixing 1 source
The gain was not used when mixing just one source.
@@ -63,9 +63,6 @@ void dsp_mix_gain_c(struct dsp_ops *ops, | ||
63 | 63 | uint32_t i; |
64 | 64 | if (n_src == 0) { |
65 | 65 | dsp_clear_c(ops, dst, n_samples); |
66 | - } else if (n_src == 1) { | |
67 | - if (dst != src[0]) | |
68 | - dsp_copy_c(ops, dst, src[0], n_samples); | |
69 | 66 | } else { |
70 | 67 | if (gain[0] == 1.0f) |
71 | 68 | dsp_copy_c(ops, dst, src[0], n_samples); |
@@ -19,7 +19,7 @@ void dsp_mix_gain_sse(struct dsp_ops *ops, | ||
19 | 19 | { |
20 | 20 | if (n_src == 0) { |
21 | 21 | memset(dst, 0, n_samples * sizeof(float)); |
22 | - } else if (n_src == 1) { | |
22 | + } else if (n_src == 1 && gain[0] == 1.0f) { | |
23 | 23 | if (dst != src[0]) |
24 | 24 | spa_memcpy(dst, src[0], n_samples * sizeof(float)); |
25 | 25 | } else { |