衰减与叠加混音算法验证分析一
CH2:输入源为-20dB正弦波1khz
CH1叠加混音:参考混音算法https://blog.csdn.net/weixin_48408892/article/details/129878036?spm=1001.2014.3001.5502
Ch0衰减混音:外部多个输入源做混音时,建议参考该算法控件(以免有失真风险),参考混音算法连接
https://blog.csdn.net/weixin_48408892/article/details/129877146?spm=1001.2014.3001.5502
衰减与叠加混音算法验证分析二
理论计算dB值
CH0:
float out1=-20.67f;
float out2=-10.69f;
float out1f=pow(10, out1/20);
float out2f=pow(10, out2/20);
float merge=(out1f+out1f+out1f+out2f)/4;
float mergeout=(float)20log10(merge);
即理论值:-16.926633dB
CH1:
float mix=(out1f+out1f+out2f);
float mixout=(float)20log10(mix);
即理论值:-6.425418dB
CH2:-20dB
CH3:-10dB
实际测量dB值
CH3:实际-10.69dB,如下图
CH2:实际-20.67dBCH1:实际-6.42db与理论计算值一致
CH0:实际-16.92dB—与理论计算值一致