• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Pipewireパッケージ(ちょっと変更)


Commit MetaInfo

Revisãoee8cb6aa67e20947b771558ba81c3dd02f3163d4 (tree)
Hora2023-09-27 23:10:56
AutorWim Taymans <wtaymans@redh...>
CommiterWim Taymans

Mensagem de Log

filter-chain: fix gain when mixing 1 source

The gain was not used when mixing just one source.

Mudança Sumário

Diff

--- a/src/modules/module-filter-chain/dsp-ops-c.c
+++ b/src/modules/module-filter-chain/dsp-ops-c.c
@@ -63,9 +63,6 @@ void dsp_mix_gain_c(struct dsp_ops *ops,
6363 uint32_t i;
6464 if (n_src == 0) {
6565 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);
6966 } else {
7067 if (gain[0] == 1.0f)
7168 dsp_copy_c(ops, dst, src[0], n_samples);
--- a/src/modules/module-filter-chain/dsp-ops-sse.c
+++ b/src/modules/module-filter-chain/dsp-ops-sse.c
@@ -19,7 +19,7 @@ void dsp_mix_gain_sse(struct dsp_ops *ops,
1919 {
2020 if (n_src == 0) {
2121 memset(dst, 0, n_samples * sizeof(float));
22- } else if (n_src == 1) {
22+ } else if (n_src == 1 && gain[0] == 1.0f) {
2323 if (dst != src[0])
2424 spa_memcpy(dst, src[0], n_samples * sizeof(float));
2525 } else {