Chromium Code Reviews| Index: webrtc/voice_engine/channel.cc |
| diff --git a/webrtc/voice_engine/channel.cc b/webrtc/voice_engine/channel.cc |
| index 582bde5f26216f645340ef2102d87e485ff2fafb..37de8ec6fe62538e1061fd43e03e2b4be7dd7a54 100644 |
| --- a/webrtc/voice_engine/channel.cc |
| +++ b/webrtc/voice_engine/channel.cc |
| @@ -695,6 +695,25 @@ MixerParticipant::AudioFrameInfo Channel::GetAudioFrameWithMuted( |
| : MixerParticipant::AudioFrameInfo::kNormal; |
| } |
| +MixerAudioSource::AudioFrameWithMuted Channel::GetAudioFrameWithMuted( |
| + int32_t id, |
| + int sample_rate_hz) { |
| + mix_audio_frame_.sample_rate_hz_ = sample_rate_hz; |
| + auto frame_info = GetAudioFrameWithMuted(id, &mix_audio_frame_); |
| + MixerAudioSource::AudioFrameInfo new_audio_frame_info; |
|
the sun
2016/10/03 11:41:26
Init to kError and omit the default section of the
aleloi
2016/10/03 12:57:28
Then the compiler warns about not handling every c
the sun
2016/10/04 20:41:12
Right, handle all cases in the switch but leave ou
aleloi
2016/10/05 13:56:51
Thanks, that seems a good tip for the future :)
|
| + switch (frame_info) { |
| + case MixerParticipant::AudioFrameInfo::kNormal: |
| + new_audio_frame_info = MixerAudioSource::AudioFrameInfo::kNormal; |
| + break; |
| + case MixerParticipant::AudioFrameInfo::kMuted: |
| + new_audio_frame_info = MixerAudioSource::AudioFrameInfo::kMuted; |
| + break; |
| + default: |
| + new_audio_frame_info = MixerAudioSource::AudioFrameInfo::kError; |
| + } |
| + return {&mix_audio_frame_, new_audio_frame_info}; |
| +} |
| + |
| int32_t Channel::NeededFrequency(int32_t id) const { |
| WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId, _channelId), |
| "Channel::NeededFrequency(id=%d)", id); |