音频振幅和分贝互转
template<class T> inline float amplitudeToDB( T ampval ) { if( ampval >0 ) return 20 * log10(ampval); else return -20 * log10(-ampval); } float dBToAmplitude( float val) { if(val>0) return pow(10, val/20.0f); else return -pow(10, -val/20.0f); }