diff options
author | pbos@webrtc.org <pbos@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | 2013-04-09 10:09:10 +0000 |
---|---|---|
committer | pbos@webrtc.org <pbos@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | 2013-04-09 10:09:10 +0000 |
commit | 54f03bc96c30337a3a97af7262cfb5148063b162 (patch) | |
tree | 7ea8ea88941b30b55449b7e64f06383cb9f67611 /voice_engine/level_indicator.cc | |
parent | c0231afbbf1d7bac40b77da5933715dc63c88144 (diff) | |
download | webrtc-54f03bc96c30337a3a97af7262cfb5148063b162.tar.gz |
WebRtc_Word32 -> int32_t in voice_engine/
BUG=314
Review URL: https://webrtc-codereview.appspot.com/1305004
git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@3792 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'voice_engine/level_indicator.cc')
-rw-r--r-- | voice_engine/level_indicator.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/voice_engine/level_indicator.cc b/voice_engine/level_indicator.cc index a84cc3a3..cc73cb06 100644 --- a/voice_engine/level_indicator.cc +++ b/voice_engine/level_indicator.cc @@ -20,7 +20,7 @@ namespace voe { // Number of bars on the indicator. // Note that the number of elements is specified because we are indexing it // in the range of 0-32 -const WebRtc_Word8 permutation[33] = +const int8_t permutation[33] = {0,1,2,3,4,4,5,5,5,5,6,6,6,6,6,7,7,7,7,8,8,8,9,9,9,9,9,9,9,9,9,9,9}; @@ -47,7 +47,7 @@ void AudioLevel::Clear() void AudioLevel::ComputeLevel(const AudioFrame& audioFrame) { - WebRtc_Word16 absValue(0); + int16_t absValue(0); // Check speech level (works for 2 channels as well) absValue = WebRtcSpl_MaxAbsValueW16( @@ -68,10 +68,10 @@ void AudioLevel::ComputeLevel(const AudioFrame& audioFrame) _count = 0; - // Highest value for a WebRtc_Word16 is 0x7fff = 32767 + // Highest value for a int16_t is 0x7fff = 32767 // Divide with 1000 to get in the range of 0-32 which is the range of // the permutation vector - WebRtc_Word32 position = _absMax/1000; + int32_t position = _absMax/1000; // Make it less likely that the bar stays at position 0. I.e. only if // its in the range 0-250 (instead of 0-1000) @@ -86,13 +86,13 @@ void AudioLevel::ComputeLevel(const AudioFrame& audioFrame) } } -WebRtc_Word8 AudioLevel::Level() const +int8_t AudioLevel::Level() const { CriticalSectionScoped cs(&_critSect); return _currentLevel; } -WebRtc_Word16 AudioLevel::LevelFullRange() const +int16_t AudioLevel::LevelFullRange() const { CriticalSectionScoped cs(&_critSect); return _currentLevelFullRange; |