Propagate decoding errors to the mixer module.
Review URL: http://webrtc-codereview.appspot.com/348001 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1417 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
c8277db7c8
commit
7859e10985
@ -24,6 +24,8 @@ class MixerParticipant
|
||||
public:
|
||||
// The implementation of this function should update audioFrame with new
|
||||
// audio every time it's called.
|
||||
//
|
||||
// If it returns -1, the frame will not be added to the mix.
|
||||
virtual WebRtc_Word32 GetAudioFrame(const WebRtc_Word32 id,
|
||||
AudioFrame& audioFrame) = 0;
|
||||
|
||||
|
@ -829,12 +829,17 @@ WebRtc_Word32 Channel::GetAudioFrame(const WebRtc_Word32 id,
|
||||
"Channel::GetAudioFrame(id=%d)", id);
|
||||
|
||||
// Get 10ms raw PCM data from the ACM (mixer limits output frequency)
|
||||
if (_audioCodingModule.PlayoutData10Ms(
|
||||
audioFrame._frequencyInHz, (AudioFrame&)audioFrame) == -1)
|
||||
if (_audioCodingModule.PlayoutData10Ms(audioFrame._frequencyInHz,
|
||||
audioFrame) == -1)
|
||||
{
|
||||
WEBRTC_TRACE(kTraceError, kTraceVoice,
|
||||
VoEId(_instanceId,_channelId),
|
||||
"Channel::GetAudioFrame() PlayoutData10Ms() failed!");
|
||||
// In all likelihood, the audio in this frame is garbage. We return an
|
||||
// error so that the audio mixer module doesn't add it to the mix. As
|
||||
// a result, it won't be played out and the actions skipped here are
|
||||
// irrelevant.
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (_RxVadDetection)
|
||||
|
Loading…
Reference in New Issue
Block a user