diff --git a/audio/audio_transport_impl.cc b/audio/audio_transport_impl.cc index 7528bf0765..9f2823bcda 100644 --- a/audio/audio_transport_impl.cc +++ b/audio/audio_transport_impl.cc @@ -71,6 +71,8 @@ int Resample(const AudioFrame& frame, const int destination_sample_rate, PushResampler* resampler, int16_t* destination) { + TRACE_EVENT2("webrtc", "Resample", "frame sample rate", frame.sample_rate_hz_, + "destination_sample_rate", destination_sample_rate); const int number_of_channels = static_cast(frame.num_channels_); const int target_number_of_samples_per_channel = destination_sample_rate / 100; diff --git a/audio/channel_receive.cc b/audio/channel_receive.cc index 18f9ecb29c..363eebf0a1 100644 --- a/audio/channel_receive.cc +++ b/audio/channel_receive.cc @@ -376,8 +376,8 @@ void ChannelReceive::InitFrameTransformerDelegate( AudioMixer::Source::AudioFrameInfo ChannelReceive::GetAudioFrameWithInfo( int sample_rate_hz, AudioFrame* audio_frame) { - TRACE_EVENT1("webrtc", "ChannelReceive::GetAudioFrameWithInfo", - "sample_rate_hz", sample_rate_hz); + TRACE_EVENT_BEGIN1("webrtc", "ChannelReceive::GetAudioFrameWithInfo", + "sample_rate_hz", sample_rate_hz); RTC_DCHECK_RUNS_SERIALIZED(&audio_thread_race_checker_); audio_frame->sample_rate_hz_ = sample_rate_hz; @@ -393,6 +393,9 @@ AudioMixer::Source::AudioFrameInfo ChannelReceive::GetAudioFrameWithInfo( // 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. + + TRACE_EVENT_END1("webrtc", "ChannelReceive::GetAudioFrameWithInfo", "error", + 1); return AudioMixer::Source::AudioFrameInfo::kError; } @@ -503,6 +506,8 @@ AudioMixer::Source::AudioFrameInfo ChannelReceive::GetAudioFrameWithInfo( })); } + TRACE_EVENT_END2("webrtc", "ChannelReceive::GetAudioFrameWithInfo", "gain", + output_gain, "muted", muted); return muted ? AudioMixer::Source::AudioFrameInfo::kMuted : AudioMixer::Source::AudioFrameInfo::kNormal; }