Add RTC_ prefix to non-standard format specifier macro "PRIdNS"
Some of the macros in format_macros.h follow the C standard and try to fill holes in it (on Windows). But this one has no direct equivalent in the standard and is just mimicking the naming convention. That's not nice. References: https://devblogs.microsoft.com/cppblog/c99-library-support-in-visual-studio-2013/ https://stackoverflow.com/a/2524673 Change-Id: I53f3faca2976a5b5d4b04a67ffb56ae0f4e930b2 Bug: webrtc:10852 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147862 Commit-Queue: Oleh Prypin <oprypin@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Niels Moller <nisse@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/master@{#28794}
This commit is contained in:
@ -202,7 +202,7 @@ void OpenSLESPlayer::AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) {
|
||||
ALOGD("SetPlayoutSampleRate(%d)", sample_rate_hz);
|
||||
audio_device_buffer_->SetPlayoutSampleRate(sample_rate_hz);
|
||||
const size_t channels = audio_parameters_.channels();
|
||||
ALOGD("SetPlayoutChannels(%" PRIuS ")", channels);
|
||||
ALOGD("SetPlayoutChannels(%" RTC_PRIuS ")", channels);
|
||||
audio_device_buffer_->SetPlayoutChannels(channels);
|
||||
RTC_CHECK(audio_device_buffer_);
|
||||
AllocateDataBuffers();
|
||||
@ -223,7 +223,7 @@ void OpenSLESPlayer::AllocateDataBuffers() {
|
||||
// which reduces jitter.
|
||||
const size_t buffer_size_in_samples =
|
||||
audio_parameters_.frames_per_buffer() * audio_parameters_.channels();
|
||||
ALOGD("native buffer size: %" PRIuS, buffer_size_in_samples);
|
||||
ALOGD("native buffer size: %" RTC_PRIuS, buffer_size_in_samples);
|
||||
ALOGD("native buffer size in ms: %.2f",
|
||||
audio_parameters_.GetBufferSizeInMilliseconds());
|
||||
fine_audio_buffer_ = absl::make_unique<FineAudioBuffer>(audio_device_buffer_);
|
||||
|
||||
@ -188,7 +188,7 @@ void OpenSLESRecorder::AttachAudioBuffer(AudioDeviceBuffer* audio_buffer) {
|
||||
// Ensure that the audio device buffer is informed about the number of
|
||||
// channels preferred by the OS on the recording side.
|
||||
const size_t channels = audio_parameters_.channels();
|
||||
ALOGD("SetRecordingChannels(%" PRIuS ")", channels);
|
||||
ALOGD("SetRecordingChannels(%" RTC_PRIuS ")", channels);
|
||||
audio_device_buffer_->SetRecordingChannels(channels);
|
||||
// Allocated memory for internal data buffers given existing audio parameters.
|
||||
AllocateDataBuffers();
|
||||
@ -345,11 +345,11 @@ void OpenSLESRecorder::AllocateDataBuffers() {
|
||||
// Create a modified audio buffer class which allows us to deliver any number
|
||||
// of samples (and not only multiple of 10ms) to match the native audio unit
|
||||
// buffer size.
|
||||
ALOGD("frames per native buffer: %" PRIuS,
|
||||
ALOGD("frames per native buffer: %" RTC_PRIuS,
|
||||
audio_parameters_.frames_per_buffer());
|
||||
ALOGD("frames per 10ms buffer: %" PRIuS,
|
||||
ALOGD("frames per 10ms buffer: %" RTC_PRIuS,
|
||||
audio_parameters_.frames_per_10ms_buffer());
|
||||
ALOGD("bytes per native buffer: %" PRIuS,
|
||||
ALOGD("bytes per native buffer: %" RTC_PRIuS,
|
||||
audio_parameters_.GetBytesPerBuffer());
|
||||
ALOGD("native sample rate: %d", audio_parameters_.sample_rate());
|
||||
RTC_DCHECK(audio_device_buffer_);
|
||||
|
||||
Reference in New Issue
Block a user