Use backticks not vertical bars to denote variables in comments for /modules/audio_coding
Bug: webrtc:12338
Change-Id: I02613d9fca45d00e2477f334b7a0416e7912e26b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227037
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34621}
diff --git a/modules/audio_coding/acm2/acm_receive_test.h b/modules/audio_coding/acm2/acm_receive_test.h
index 043092c..6349c63 100644
--- a/modules/audio_coding/acm2/acm_receive_test.h
+++ b/modules/audio_coding/acm2/acm_receive_test.h
@@ -71,8 +71,8 @@
RTC_DISALLOW_COPY_AND_ASSIGN(AcmReceiveTestOldApi);
};
-// This test toggles the output frequency every |toggle_period_ms|. The test
-// starts with |output_freq_hz_1|. Except for the toggling, it does the same
+// This test toggles the output frequency every `toggle_period_ms`. The test
+// starts with `output_freq_hz_1`. Except for the toggling, it does the same
// thing as AcmReceiveTestOldApi.
class AcmReceiveTestToggleOutputFreqOldApi : public AcmReceiveTestOldApi {
public:
diff --git a/modules/audio_coding/acm2/acm_receiver.cc b/modules/audio_coding/acm2/acm_receiver.cc
index 80cb3c5..6d9211c 100644
--- a/modules/audio_coding/acm2/acm_receiver.cc
+++ b/modules/audio_coding/acm2/acm_receiver.cc
@@ -131,7 +131,7 @@
/*num_channels=*/format->num_channels,
/*sdp_format=*/std::move(format->sdp_format)};
}
- } // |mutex_| is released.
+ } // `mutex_` is released.
if (neteq_->InsertPacket(rtp_header, incoming_payload) < 0) {
RTC_LOG(LERROR) << "AcmReceiver::InsertPacket "
@@ -201,7 +201,7 @@
// We might end up here ONLY if codec is changed.
}
- // Store current audio in |last_audio_buffer_| for next time.
+ // Store current audio in `last_audio_buffer_` for next time.
memcpy(last_audio_buffer_.get(), audio_frame->data(),
sizeof(int16_t) * audio_frame->samples_per_channel_ *
audio_frame->num_channels_);
diff --git a/modules/audio_coding/acm2/acm_receiver.h b/modules/audio_coding/acm2/acm_receiver.h
index 19dc577..9963603 100644
--- a/modules/audio_coding/acm2/acm_receiver.h
+++ b/modules/audio_coding/acm2/acm_receiver.h
@@ -177,9 +177,9 @@
// enabled then the maximum NACK list size is modified accordingly.
//
// If the sequence number of last received packet is N, the sequence numbers
- // of NACK list are in the range of [N - |max_nack_list_size|, N).
+ // of NACK list are in the range of [N - `max_nack_list_size`, N).
//
- // |max_nack_list_size| should be positive (none zero) and less than or
+ // `max_nack_list_size` should be positive (none zero) and less than or
// equal to |Nack::kNackListSizeLimit|. Otherwise, No change is applied and -1
// is returned. 0 is returned at success.
//
@@ -189,12 +189,12 @@
void DisableNack();
//
- // Get a list of packets to be retransmitted. |round_trip_time_ms| is an
+ // Get a list of packets to be retransmitted. `round_trip_time_ms` is an
// estimate of the round-trip-time (in milliseconds). Missing packets which
// will be playout in a shorter time than the round-trip-time (with respect
// to the time this API is called) will not be included in the list.
//
- // Negative |round_trip_time_ms| results is an error message and empty list
+ // Negative `round_trip_time_ms` results is an error message and empty list
// is returned.
//
std::vector<uint16_t> GetNackList(int64_t round_trip_time_ms) const;
diff --git a/modules/audio_coding/acm2/audio_coding_module.cc b/modules/audio_coding/acm2/audio_coding_module.cc
index b5c0c3b..d629139 100644
--- a/modules/audio_coding/acm2/audio_coding_module.cc
+++ b/modules/audio_coding/acm2/audio_coding_module.cc
@@ -125,7 +125,7 @@
int Add10MsDataInternal(const AudioFrame& audio_frame, InputData* input_data)
RTC_EXCLUSIVE_LOCKS_REQUIRED(acm_mutex_);
- // TODO(bugs.webrtc.org/10739): change |absolute_capture_timestamp_ms| to
+ // TODO(bugs.webrtc.org/10739): change `absolute_capture_timestamp_ms` to
// int64_t when it always receives a valid value.
int Encode(const InputData& input_data,
absl::optional<int64_t> absolute_capture_timestamp_ms)
@@ -141,8 +141,8 @@
//
// in_frame: input audio-frame
// ptr_out: pointer to output audio_frame. If no preprocessing is required
- // |ptr_out| will be pointing to |in_frame|, otherwise pointing to
- // |preprocess_frame_|.
+ // `ptr_out` will be pointing to `in_frame`, otherwise pointing to
+ // `preprocess_frame_`.
//
// Return value:
// -1: if encountering an error.
@@ -152,7 +152,7 @@
RTC_EXCLUSIVE_LOCKS_REQUIRED(acm_mutex_);
// Change required states after starting to receive the codec corresponding
- // to |index|.
+ // to `index`.
int UpdateUponReceivingCodec(int index);
mutable Mutex acm_mutex_;
@@ -397,7 +397,7 @@
// output data if needed.
ReMixFrame(*ptr_frame, current_num_channels, &input_data->buffer);
- // For pushing data to primary, point the |ptr_audio| to correct buffer.
+ // For pushing data to primary, point the `ptr_audio` to correct buffer.
input_data->audio = input_data->buffer.data();
RTC_DCHECK_GE(input_data->buffer.size(),
input_data->length_per_channel * input_data->audio_channel);
@@ -414,7 +414,7 @@
// encoder is mono and input is stereo. In case of dual-streaming, both
// encoders has to be mono for down-mix to take place.
// |*ptr_out| will point to the pre-processed audio-frame. If no pre-processing
-// is required, |*ptr_out| points to |in_frame|.
+// is required, |*ptr_out| points to `in_frame`.
// TODO(yujo): Make this more efficient for muted frames.
int AudioCodingModuleImpl::PreprocessToAddData(const AudioFrame& in_frame,
const AudioFrame** ptr_out) {
diff --git a/modules/audio_coding/acm2/audio_coding_module_unittest.cc b/modules/audio_coding/acm2/audio_coding_module_unittest.cc
index 7465456..a0a8854 100644
--- a/modules/audio_coding/acm2/audio_coding_module_unittest.cc
+++ b/modules/audio_coding/acm2/audio_coding_module_unittest.cc
@@ -342,7 +342,7 @@
// Introduce this class to set different expectations on the number of encoded
// bytes. This class expects all encoded packets to be 9 bytes (matching one
-// CNG SID frame) or 0 bytes. This test depends on |input_frame_| containing
+// CNG SID frame) or 0 bytes. This test depends on `input_frame_` containing
// (near-)zero values. It also introduces a way to register comfort noise with
// a custom payload type.
class AudioCodingModuleTestWithComfortNoiseOldApi
@@ -593,7 +593,7 @@
InsertAudio();
ASSERT_LT(loop_counter++, 10);
}
- // Set |last_packet_number_| to one less that |num_calls| so that the packet
+ // Set `last_packet_number_` to one less that `num_calls` so that the packet
// will be fetched in the next InsertPacket() call.
last_packet_number_ = packet_cb_.num_calls() - 1;
@@ -617,7 +617,7 @@
if (num_calls > last_packet_number_) {
// Get the new payload out from the callback handler.
// Note that since we swap buffers here instead of directly inserting
- // a pointer to the data in |packet_cb_|, we avoid locking the callback
+ // a pointer to the data in `packet_cb_`, we avoid locking the callback
// for the duration of the IncomingPacket() call.
packet_cb_.SwapBuffers(&last_payload_vec_);
ASSERT_GT(last_payload_vec_.size(), 0u);
@@ -1140,8 +1140,8 @@
// Sets up the test::AcmSendTest object. Returns true on success, otherwise
// false.
bool SetUpSender(std::string input_file_name, int source_rate) {
- // Note that |audio_source_| will loop forever. The test duration is set
- // explicitly by |kTestDurationMs|.
+ // Note that `audio_source_` will loop forever. The test duration is set
+ // explicitly by `kTestDurationMs`.
audio_source_.reset(new test::InputAudioFile(input_file_name));
send_test_.reset(new test::AcmSendTestOldApi(audio_source_.get(),
source_rate, kTestDurationMs));
@@ -1243,7 +1243,7 @@
VerifyPacket(packet.get());
// TODO(henrik.lundin) Save the packet to file as well.
- // Pass it on to the caller. The caller becomes the owner of |packet|.
+ // Pass it on to the caller. The caller becomes the owner of `packet`.
return packet;
}
@@ -1631,8 +1631,8 @@
bool SetUpSender() {
const std::string input_file_name =
webrtc::test::ResourcePath("audio_coding/testfile32kHz", "pcm");
- // Note that |audio_source_| will loop forever. The test duration is set
- // explicitly by |kTestDurationMs|.
+ // Note that `audio_source_` will loop forever. The test duration is set
+ // explicitly by `kTestDurationMs`.
audio_source_.reset(new test::InputAudioFile(input_file_name));
static const int kSourceRateHz = 32000;
send_test_.reset(new test::AcmSendTestOldApi(
@@ -1859,7 +1859,7 @@
// This test fixture is implemented to run ACM and change the desired output
// frequency during the call. The input packets are simply PCM16b-wb encoded
-// payloads with a constant value of |kSampleValue|. The test fixture itself
+// payloads with a constant value of `kSampleValue`. The test fixture itself
// acts as PacketSource in between the receive test class and the constant-
// payload packet source class. The output is both written to file, and analyzed
// in this test fixture.
diff --git a/modules/audio_coding/acm2/call_statistics.cc b/modules/audio_coding/acm2/call_statistics.cc
index e97e529..0aad594 100644
--- a/modules/audio_coding/acm2/call_statistics.cc
+++ b/modules/audio_coding/acm2/call_statistics.cc
@@ -44,7 +44,7 @@
break;
}
case AudioFrame::kUndefined: {
- // If the audio is decoded by NetEq, |kUndefined| is not an option.
+ // If the audio is decoded by NetEq, `kUndefined` is not an option.
RTC_NOTREACHED();
}
}
diff --git a/modules/audio_coding/acm2/call_statistics.h b/modules/audio_coding/acm2/call_statistics.h
index 5d94ac4..a2db2a29 100644
--- a/modules/audio_coding/acm2/call_statistics.h
+++ b/modules/audio_coding/acm2/call_statistics.h
@@ -36,8 +36,8 @@
CallStatistics() {}
~CallStatistics() {}
- // Call this method to indicate that NetEq engaged in decoding. |speech_type|
- // is the audio-type according to NetEq, and |muted| indicates if the decoded
+ // Call this method to indicate that NetEq engaged in decoding. `speech_type`
+ // is the audio-type according to NetEq, and `muted` indicates if the decoded
// frame was produced in muted state.
void DecodedByNetEq(AudioFrame::SpeechType speech_type, bool muted);