Fixes ClangTidy errors in audio/

These are manual edits please verify there are no typos.
Feel free to auto-submit if there are no issues.

Bug: webrtc:10410
Change-Id: I1b46653b91bce012afabfa0f2d249718e6de2df8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127626
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27139}
This commit is contained in:
Benjamin Wright 2019-03-13 17:35:46 -07:00 committed by Commit Bot
parent 8965fbc542
commit 17b050f8f8
4 changed files with 11 additions and 14 deletions

View File

@ -36,7 +36,6 @@ namespace {
using testing::_;
using testing::FloatEq;
using testing::Return;
using testing::ReturnRef;
AudioDecodingCallStats MakeAudioDecodeStatsForTest() {
AudioDecodingCallStats audio_decode_stats;
@ -64,8 +63,9 @@ const double kTotalOutputDuration = 0.5;
const CallReceiveStatistics kCallStats = {345, 678, 901, 234,
-12, 567, 890, 123};
const std::pair<int, SdpAudioFormat> kReceiveCodec =
{123, {"codec_name_recv", 96000, 0}};
const std::pair<int, SdpAudioFormat> kReceiveCodec = {
123,
{"codec_name_recv", 96000, 0}};
const NetworkStatistics kNetworkStats = {
123, 456, false, 789012, 3456, 123, 456, 789, 0, {}, 789,
12, 345, 678, 901, 0, -1, -1, -1, -1, -1, 0};

View File

@ -144,7 +144,7 @@ int32_t AudioTransportImpl::RecordedDataIsAvailable(
// Measure audio level of speech after all processing.
double sample_duration = static_cast<double>(number_of_frames) / sample_rate;
audio_level_.ComputeLevel(*audio_frame.get(), sample_duration);
audio_level_.ComputeLevel(*audio_frame, sample_duration);
// Copy frame and push to each sending stream. The copy is required since an
// encoding task will be posted internally to each stream.
@ -157,7 +157,7 @@ int32_t AudioTransportImpl::RecordedDataIsAvailable(
auto it = sending_streams_.begin();
while (++it != sending_streams_.end()) {
std::unique_ptr<AudioFrame> audio_frame_copy(new AudioFrame());
audio_frame_copy->CopyFrom(*audio_frame.get());
audio_frame_copy->CopyFrom(*audio_frame);
(*it)->SendAudioData(std::move(audio_frame_copy));
}
// Send the original frame to the first stream w/o copying.

View File

@ -76,11 +76,10 @@ class TransportFeedbackProxy;
class TransportSequenceNumberProxy;
class VoERtcpObserver;
class ChannelSend
: public ChannelSendInterface,
public AudioPacketizationCallback, // receive encoded packets from the
// ACM
public TargetTransferRateObserver {
class ChannelSend : public ChannelSendInterface,
public AudioPacketizationCallback, // receive encoded
// packets from the ACM
public TargetTransferRateObserver {
public:
// TODO(nisse): Make OnUplinkPacketLossRate public, and delete friend
// declaration.
@ -603,7 +602,7 @@ int32_t ChannelSend::SendMediaTransportAudio(
// Sample count isn't conveniently available from the AudioCodingModule,
// and needs some refactoring to wire up in a good way. For now, left as
// zero.
/*sample_count=*/0,
/*samples_per_channel=*/0,
/*sequence_number=*/media_transport_sequence_number_,
MediaTransportFrameTypeForWebrtcFrameType(frameType), payloadType,

View File

@ -34,9 +34,7 @@ namespace webrtc {
namespace test {
namespace {
using testing::_;
using testing::NiceMock;
using testing::Return;
constexpr int kPayloadTypeOpus = 17;
constexpr int kSamplingFrequency = 48000;
@ -113,7 +111,7 @@ TEST(AudioWithMediaTransport, DeliversAudio) {
webrtc::internal::AudioReceiveStream receive_stream(
Clock::GetRealTimeClock(),
/*rtp_stream_receiver_controller=*/nullptr,
/*receiver_controller=*/nullptr,
/*packet_router=*/nullptr, receive_process_thread.get(), receive_config,
audio_state, null_event_log.get());