pcm音量计算
inline double amp2dB(const double amp) { // input must be positive +1.0 = 0dB if (amp < 0.0000000001) { return -200.0; } return (20.0 * log10(amp)); } inline double dB2amp(const double dB) { // 0dB = 1.0 //return pow(10.0,(dB * 0.05)); // 10^(dB/20) return exp(dB * 0.115129254649702195134608473381376825273036956787109375); }
原创文章欢迎转载,转载请注明出处:http://www.cnblogs.com/zhouchanwen