Expose NetEq playout mode off through VoiceEngine.

BUG=

Review URL: https://webrtc-codereview.appspot.com/971016

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3272 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
roosa@google.com
2012-12-12 21:59:14 +00:00
parent 0870f02cdb
commit b718619f0a
6 changed files with 49 additions and 10 deletions

View File

@ -324,6 +324,9 @@ WebRtc_Word32 ACMNetEQ::SetPlayoutMode(const AudioPlayoutMode mode) {
case streaming:
playoutMode = kPlayoutStreaming;
break;
case off:
playoutMode = kPlayoutOff;
break;
}
if (WebRtcNetEQ_SetPlayoutMode(_inst[idx], playoutMode) < 0) {
LogError("SetPlayoutMode", idx);
@ -984,6 +987,9 @@ WebRtc_Word16 ACMNetEQ::AddSlave(const WebRtcNetEQDecoder* usedCodecs,
case streaming:
playoutMode = kPlayoutStreaming;
break;
case off:
playoutMode = kPlayoutOff;
break;
}
if (WebRtcNetEQ_SetPlayoutMode(_inst[slaveIdx], playoutMode) < 0) {
LogError("SetPlayoutMode", 1);

View File

@ -2226,7 +2226,8 @@ WebRtc_Word32 AudioCodingModuleImpl::DecoderEstimatedBandwidth() const {
// Set playout mode for: voice, fax, or streaming.
WebRtc_Word32 AudioCodingModuleImpl::SetPlayoutMode(
const AudioPlayoutMode mode) {
if ((mode != voice) && (mode != fax) && (mode != streaming)) {
if ((mode != voice) && (mode != fax) && (mode != streaming) &&
(mode != off)) {
WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, _id,
"Invalid playout mode.");
return -1;