Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Unified Diff: webrtc/voice_engine/channel.cc

Issue 2420913002: Move audio frame memory handling inside AudioMixer. (Closed)
Patch Set: Updated interface usages (I landed another CL in the wrong order...). Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/voice_engine/channel.h ('k') | webrtc/voice_engine/channel_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/voice_engine/channel.cc
diff --git a/webrtc/voice_engine/channel.cc b/webrtc/voice_engine/channel.cc
index 44a1c73b08c64624b9b6b54fd6a41ed91fa193f5..6d053323da591c62e404d2f155466f7124c88ed0 100644
--- a/webrtc/voice_engine/channel.cc
+++ b/webrtc/voice_engine/channel.cc
@@ -712,11 +712,12 @@ 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;
+AudioMixer::Source::AudioFrameInfo Channel::GetAudioFrameWithInfo(
+ int sample_rate_hz,
+ AudioFrame* audio_frame) {
+ audio_frame->sample_rate_hz_ = sample_rate_hz;
- const auto frame_info = GetAudioFrameWithMuted(-1, &mix_audio_frame_);
+ const auto frame_info = GetAudioFrameWithMuted(-1, audio_frame);
using FrameInfo = AudioMixer::Source::AudioFrameInfo;
FrameInfo new_audio_frame_info = FrameInfo::kError;
@@ -731,7 +732,7 @@ AudioMixer::Source::AudioFrameWithInfo Channel::GetAudioFrameWithInfo(
new_audio_frame_info = FrameInfo::kError;
break;
}
- return {&mix_audio_frame_, new_audio_frame_info};
+ return new_audio_frame_info;
}
int32_t Channel::NeededFrequency(int32_t id) const {
« no previous file with comments | « webrtc/voice_engine/channel.h ('k') | webrtc/voice_engine/channel_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698