Index: webrtc/voice_engine/channel.cc |
diff --git a/webrtc/voice_engine/channel.cc b/webrtc/voice_engine/channel.cc |
index e36e54d07502fbbfa27182c04aea646bd227951d..44a1c73b08c64624b9b6b54fd6a41ed91fa193f5 100644 |
--- a/webrtc/voice_engine/channel.cc |
+++ b/webrtc/voice_engine/channel.cc |
@@ -712,6 +712,28 @@ MixerParticipant::AudioFrameInfo Channel::GetAudioFrameWithMuted( |
: MixerParticipant::AudioFrameInfo::kNormal; |
} |
+AudioMixer::Source::AudioFrameWithInfo Channel::GetAudioFrameWithInfo( |
+ int sample_rate_hz) { |
+ mix_audio_frame_.sample_rate_hz_ = sample_rate_hz; |
+ |
+ const auto frame_info = GetAudioFrameWithMuted(-1, &mix_audio_frame_); |
+ |
+ using FrameInfo = AudioMixer::Source::AudioFrameInfo; |
+ FrameInfo new_audio_frame_info = FrameInfo::kError; |
+ switch (frame_info) { |
+ case MixerParticipant::AudioFrameInfo::kNormal: |
+ new_audio_frame_info = FrameInfo::kNormal; |
+ break; |
+ case MixerParticipant::AudioFrameInfo::kMuted: |
+ new_audio_frame_info = FrameInfo::kMuted; |
+ break; |
+ case MixerParticipant::AudioFrameInfo::kError: |
+ new_audio_frame_info = FrameInfo::kError; |
+ break; |
+ } |
+ 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); |