Index: voice_engine/channel.cc |
diff --git a/voice_engine/channel.cc b/voice_engine/channel.cc |
index 875454a17d1321fc30e5bd90edbc0fff2ab3caf4..4dff3de585c38ef9aeeb2001fb0906cc6e621b7b 100644 |
--- a/voice_engine/channel.cc |
+++ b/voice_engine/channel.cc |
@@ -646,6 +646,8 @@ |
AudioFrameOperations::Mute(audio_frame); |
} |
+ // Convert module ID to internal VoE channel ID |
+ audio_frame->id_ = VoEChannelId(audio_frame->id_); |
// Store speech type for dead-or-alive detection |
_outputSpeechType = audio_frame->speech_type_; |
@@ -794,6 +796,7 @@ |
WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(_instanceId, _channelId), |
"Channel::Channel() - ctor"); |
AudioCodingModule::Config acm_config(config.acm_config); |
+ acm_config.id = VoEModuleId(instanceId, channelId); |
acm_config.neteq_config.enable_muted_state = true; |
audio_coding_.reset(AudioCodingModule::Create(acm_config)); |
@@ -1639,6 +1642,7 @@ |
// TODO(henrika): try to avoid copying by moving ownership of audio frame |
// either into pool of frames or into the task itself. |
audio_frame->CopyFrom(audio_input); |
+ audio_frame->id_ = ChannelId(); |
encoder_queue_->PostTask(std::unique_ptr<rtc::QueuedTask>( |
new ProcessAndEncodeAudioTask(std::move(audio_frame), this))); |
} |
@@ -1655,6 +1659,7 @@ |
CodecInst codec; |
const int result = GetSendCodec(codec); |
std::unique_ptr<AudioFrame> audio_frame(new AudioFrame()); |
+ audio_frame->id_ = ChannelId(); |
// TODO(ossu): Investigate how this could happen. b/62909493 |
if (result == 0) { |
audio_frame->sample_rate_hz_ = std::min(codec.plfreq, sample_rate); |
@@ -1675,6 +1680,7 @@ |
RTC_DCHECK_RUN_ON(encoder_queue_); |
RTC_DCHECK_GT(audio_input->samples_per_channel_, 0); |
RTC_DCHECK_LE(audio_input->num_channels_, 2); |
+ RTC_DCHECK_EQ(audio_input->id_, ChannelId()); |
bool is_muted = InputMute(); |
AudioFrameOperations::Mute(audio_input, previous_frame_muted_, is_muted); |