Renamed methods.
Renaming inputSampleRate, outputSampleRate, terminate to avoid triggering Apple's private API check. Change-Id: I9857fb374bf30c4a6ef937fb183ef4858af7e0c1 Bug: webrtc:14193 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275641 Commit-Queue: Peter Hanspers <peterhanspers@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Henrik Andreassson <henrika@webrtc.org> Cr-Commit-Position: refs/heads/main@{#38094}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
bcf24f5bcd
commit
1a59cb6108
@ -171,7 +171,7 @@ RTC_OBJC_EXPORT @protocol RTC_OBJC_TYPE
|
|||||||
* must be notified back to native ADM via `-[RTCAudioDeviceDelegate
|
* must be notified back to native ADM via `-[RTCAudioDeviceDelegate
|
||||||
* notifyAudioParametersChange]`.
|
* notifyAudioParametersChange]`.
|
||||||
*/
|
*/
|
||||||
@property(readonly) double inputSampleRate;
|
@property(readonly) double deviceInputSampleRate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates current size of record buffer. Changes to this property
|
* Indicates current size of record buffer. Changes to this property
|
||||||
@ -194,7 +194,7 @@ RTC_OBJC_EXPORT @protocol RTC_OBJC_TYPE
|
|||||||
* Indicates current sample rate of audio playback. Changes to this property
|
* Indicates current sample rate of audio playback. Changes to this property
|
||||||
* must be notified back to native ADM via `-[RTCAudioDeviceDelegate notifyAudioParametersChange]`.
|
* must be notified back to native ADM via `-[RTCAudioDeviceDelegate notifyAudioParametersChange]`.
|
||||||
*/
|
*/
|
||||||
@property(readonly) double outputSampleRate;
|
@property(readonly) double deviceOutputSampleRate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates current size of playback buffer. Changes to this property
|
* Indicates current size of playback buffer. Changes to this property
|
||||||
@ -230,7 +230,7 @@ RTC_OBJC_EXPORT @protocol RTC_OBJC_TYPE
|
|||||||
* De-initializes RTCAudioDevice. Implementation should forget about `delegate` provided in
|
* De-initializes RTCAudioDevice. Implementation should forget about `delegate` provided in
|
||||||
* `initializeWithDelegate`.
|
* `initializeWithDelegate`.
|
||||||
*/
|
*/
|
||||||
- (BOOL)terminate;
|
- (BOOL)terminateDevice;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Property to indicate if `initializePlayout` call required before invocation of `startPlayout`.
|
* Property to indicate if `initializePlayout` call required before invocation of `startPlayout`.
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
webrtc::AudioParameters RecordParameters(id<RTC_OBJC_TYPE(RTCAudioDevice)> audio_device) {
|
webrtc::AudioParameters RecordParameters(id<RTC_OBJC_TYPE(RTCAudioDevice)> audio_device) {
|
||||||
const double sample_rate = static_cast<int>([audio_device inputSampleRate]);
|
const double sample_rate = static_cast<int>([audio_device deviceInputSampleRate]);
|
||||||
const size_t channels = static_cast<size_t>([audio_device inputNumberOfChannels]);
|
const size_t channels = static_cast<size_t>([audio_device inputNumberOfChannels]);
|
||||||
const size_t frames_per_buffer =
|
const size_t frames_per_buffer =
|
||||||
static_cast<size_t>(sample_rate * [audio_device inputIOBufferDuration] + .5);
|
static_cast<size_t>(sample_rate * [audio_device inputIOBufferDuration] + .5);
|
||||||
@ -30,7 +30,7 @@ webrtc::AudioParameters RecordParameters(id<RTC_OBJC_TYPE(RTCAudioDevice)> audio
|
|||||||
}
|
}
|
||||||
|
|
||||||
webrtc::AudioParameters PlayoutParameters(id<RTC_OBJC_TYPE(RTCAudioDevice)> audio_device) {
|
webrtc::AudioParameters PlayoutParameters(id<RTC_OBJC_TYPE(RTCAudioDevice)> audio_device) {
|
||||||
const double sample_rate = static_cast<int>([audio_device outputSampleRate]);
|
const double sample_rate = static_cast<int>([audio_device deviceOutputSampleRate]);
|
||||||
const size_t channels = static_cast<size_t>([audio_device outputNumberOfChannels]);
|
const size_t channels = static_cast<size_t>([audio_device outputNumberOfChannels]);
|
||||||
const size_t frames_per_buffer =
|
const size_t frames_per_buffer =
|
||||||
static_cast<size_t>(sample_rate * [audio_device outputIOBufferDuration] + .5);
|
static_cast<size_t>(sample_rate * [audio_device outputIOBufferDuration] + .5);
|
||||||
@ -112,7 +112,7 @@ int32_t ObjCAudioDeviceModule::Terminate() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ([audio_device_ isInitialized]) {
|
if ([audio_device_ isInitialized]) {
|
||||||
if (![audio_device_ terminate]) {
|
if (![audio_device_ terminateDevice]) {
|
||||||
RTC_LOG_F(LS_ERROR) << "Failed to terminate audio device";
|
RTC_LOG_F(LS_ERROR) << "Failed to terminate audio device";
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user