/tags/rel-0-6-1/FreeSpeech/audio_blocks/include/audio.h
# · C Header · 24 lines · 16 code · 6 blank · 2 comment · 0 complexity · 1963e4abc1adf9e19300c17357d6ab13 MD5 · raw file
- // Copyright (C) 2001 InfoSpace Speech Solutions
- // author: Jean-Marc Valin
- #ifndef AUDIO_H
- #define AUDIO_H
- #include <math.h>
- inline float bark(float f)
- {
- return 13*atan(0.00076*f) + 3.5*atan((0.0001333*f) * (0.0001333*f));
- }
- inline float dB(float P)
- {
- return 4.3429*log(P);
- }
- inline float undB(float d)
- {
- return exp(0.23026*d);
- }
- #endif