Remove assert "currentVoEMicLevel <= kMaxVolumeLevel". We ran into an issue on a Linux system where the currentVoEMicLevel was in fact greater than the kMaxVolumeLevel. Therefore we are removing this assert and capping the currentMicLevel to the maxVolumeLevel when this case is detected.

Review URL: http://webrtc-codereview.appspot.com/180001

git-svn-id: http://webrtc.googlecode.com/svn/trunk@661 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
punyabrata@webrtc.org 2011-09-28 17:45:03 +00:00
parent c611b1a950
commit 6b6d08164f

View File

@ -199,7 +199,15 @@ WebRtc_Word32 VoEBaseImpl::RecordedDataIsAvailable(
/ (maxVolume));
}
}
assert(currentVoEMicLevel <= kMaxVolumeLevel);
// We learned that on certain systems (e.g Linux) the currentVoEMicLevel
// can be greater than the maxVolumeLevel therefore
// we are going to cap the currentVoEMicLevel to the maxVolumeLevel
// if it turns out that the currentVoEMicLevel is indeed greater
// than the maxVolumeLevel
if (currentVoEMicLevel > kMaxVolumeLevel)
{
currentVoEMicLevel = kMaxVolumeLevel;
}
}
// Keep track if the MicLevel has been changed by the AGC, if not,