00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _AUDIO_LEVEL_H_
00022 #define _AUDIO_LEVEL_H_
00023
00034 class AudioLevel
00035 {
00036 public:
00037
00038 static const float DB_FLOOR;
00039
00040 enum FaderType {
00041 ShortFader = 0,
00042 LongFader = 1,
00043 IEC268Meter = 2,
00044 IEC268LongMeter = 3,
00045 PreviewLevel = 4
00046 };
00047
00048 static float multiplier_to_dB(float multiplier);
00049 static float dB_to_multiplier(float dB);
00050
00051 static float fader_to_dB(int level, int maxLevel, FaderType type);
00052 static int dB_to_fader(float dB, int maxFaderLevel, FaderType type);
00053
00054 static float fader_to_multiplier(int level, int maxLevel, FaderType type);
00055 static int multiplier_to_fader(float multiplier, int maxFaderLevel,
00056 FaderType type);
00057
00058
00059 static int multiplier_to_preview(float multiplier, int levels);
00060 static float preview_to_multiplier(int level, int levels);
00061 };
00062
00063
00064 #endif
00065