| Index: webrtc/modules/audio_device/audio_device_impl.cc
|
| diff --git a/webrtc/modules/audio_device/audio_device_impl.cc b/webrtc/modules/audio_device/audio_device_impl.cc
|
| index bae4f6a4ef17ee26d542f7b4be3ed646f0d19a57..e8a3a72605f22a87fbcea3dec6bdd68e30ce7976 100644
|
| --- a/webrtc/modules/audio_device/audio_device_impl.cc
|
| +++ b/webrtc/modules/audio_device/audio_device_impl.cc
|
| @@ -635,26 +635,6 @@ int32_t AudioDeviceModuleImpl::MinSpeakerVolume(uint32_t* minVolume) const {
|
| return (0);
|
| }
|
|
|
| -// ----------------------------------------------------------------------------
|
| -// SpeakerVolumeStepSize
|
| -// ----------------------------------------------------------------------------
|
| -
|
| -int32_t AudioDeviceModuleImpl::SpeakerVolumeStepSize(uint16_t* stepSize) const {
|
| - LOG(INFO) << __FUNCTION__;
|
| - CHECK_INITIALIZED();
|
| -
|
| - uint16_t delta(0);
|
| -
|
| - if (_ptrAudioDevice->SpeakerVolumeStepSize(delta) == -1) {
|
| - LOG(LERROR) << "failed to retrieve the speaker-volume step size";
|
| - return -1;
|
| - }
|
| -
|
| - *stepSize = delta;
|
| - LOG(INFO) << "output: " << *stepSize;
|
| - return (0);
|
| -}
|
| -
|
| // ----------------------------------------------------------------------------
|
| // SpeakerMuteIsAvailable
|
| // ----------------------------------------------------------------------------
|
| @@ -751,54 +731,6 @@ int32_t AudioDeviceModuleImpl::MicrophoneMute(bool* enabled) const {
|
| return (0);
|
| }
|
|
|
| -// ----------------------------------------------------------------------------
|
| -// MicrophoneBoostIsAvailable
|
| -// ----------------------------------------------------------------------------
|
| -
|
| -int32_t AudioDeviceModuleImpl::MicrophoneBoostIsAvailable(bool* available) {
|
| - LOG(INFO) << __FUNCTION__;
|
| - CHECK_INITIALIZED();
|
| -
|
| - bool isAvailable(0);
|
| -
|
| - if (_ptrAudioDevice->MicrophoneBoostIsAvailable(isAvailable) == -1) {
|
| - return -1;
|
| - }
|
| -
|
| - *available = isAvailable;
|
| - LOG(INFO) << "output: " << isAvailable;
|
| - return (0);
|
| -}
|
| -
|
| -// ----------------------------------------------------------------------------
|
| -// SetMicrophoneBoost
|
| -// ----------------------------------------------------------------------------
|
| -
|
| -int32_t AudioDeviceModuleImpl::SetMicrophoneBoost(bool enable) {
|
| - LOG(INFO) << __FUNCTION__ << "(" << enable << ")";
|
| - CHECK_INITIALIZED();
|
| - return (_ptrAudioDevice->SetMicrophoneBoost(enable));
|
| -}
|
| -
|
| -// ----------------------------------------------------------------------------
|
| -// MicrophoneBoost
|
| -// ----------------------------------------------------------------------------
|
| -
|
| -int32_t AudioDeviceModuleImpl::MicrophoneBoost(bool* enabled) const {
|
| - LOG(INFO) << __FUNCTION__;
|
| - CHECK_INITIALIZED();
|
| -
|
| - bool onOff(false);
|
| -
|
| - if (_ptrAudioDevice->MicrophoneBoost(onOff) == -1) {
|
| - return -1;
|
| - }
|
| -
|
| - *enabled = onOff;
|
| - LOG(INFO) << "output: " << onOff;
|
| - return (0);
|
| -}
|
| -
|
| // ----------------------------------------------------------------------------
|
| // MicrophoneVolumeIsAvailable
|
| // ----------------------------------------------------------------------------
|
| @@ -1120,26 +1052,6 @@ int32_t AudioDeviceModuleImpl::MinMicrophoneVolume(uint32_t* minVolume) const {
|
| return (0);
|
| }
|
|
|
| -// ----------------------------------------------------------------------------
|
| -// MicrophoneVolumeStepSize
|
| -// ----------------------------------------------------------------------------
|
| -
|
| -int32_t AudioDeviceModuleImpl::MicrophoneVolumeStepSize(
|
| - uint16_t* stepSize) const {
|
| - LOG(INFO) << __FUNCTION__;
|
| - CHECK_INITIALIZED();
|
| -
|
| - uint16_t delta(0);
|
| -
|
| - if (_ptrAudioDevice->MicrophoneVolumeStepSize(delta) == -1) {
|
| - return -1;
|
| - }
|
| -
|
| - *stepSize = delta;
|
| - LOG(INFO) << "output: " << *stepSize;
|
| - return (0);
|
| -}
|
| -
|
| // ----------------------------------------------------------------------------
|
| // PlayoutDevices
|
| // ----------------------------------------------------------------------------
|
| @@ -1432,123 +1344,6 @@ int32_t AudioDeviceModuleImpl::RegisterAudioCallback(
|
| return _audioDeviceBuffer.RegisterAudioCallback(audioCallback);
|
| }
|
|
|
| -// ----------------------------------------------------------------------------
|
| -// StartRawInputFileRecording
|
| -// ----------------------------------------------------------------------------
|
| -
|
| -int32_t AudioDeviceModuleImpl::StartRawInputFileRecording(
|
| - const char pcmFileNameUTF8[kAdmMaxFileNameSize]) {
|
| - LOG(INFO) << __FUNCTION__;
|
| - CHECK_INITIALIZED();
|
| -
|
| - if (NULL == pcmFileNameUTF8) {
|
| - return -1;
|
| - }
|
| -
|
| - return (_audioDeviceBuffer.StartInputFileRecording(pcmFileNameUTF8));
|
| -}
|
| -
|
| -// ----------------------------------------------------------------------------
|
| -// StopRawInputFileRecording
|
| -// ----------------------------------------------------------------------------
|
| -
|
| -int32_t AudioDeviceModuleImpl::StopRawInputFileRecording() {
|
| - LOG(INFO) << __FUNCTION__;
|
| - CHECK_INITIALIZED();
|
| -
|
| - return (_audioDeviceBuffer.StopInputFileRecording());
|
| -}
|
| -
|
| -// ----------------------------------------------------------------------------
|
| -// StartRawOutputFileRecording
|
| -// ----------------------------------------------------------------------------
|
| -
|
| -int32_t AudioDeviceModuleImpl::StartRawOutputFileRecording(
|
| - const char pcmFileNameUTF8[kAdmMaxFileNameSize]) {
|
| - LOG(INFO) << __FUNCTION__;
|
| - CHECK_INITIALIZED();
|
| -
|
| - if (NULL == pcmFileNameUTF8) {
|
| - return -1;
|
| - }
|
| -
|
| - return (_audioDeviceBuffer.StartOutputFileRecording(pcmFileNameUTF8));
|
| -}
|
| -
|
| -// ----------------------------------------------------------------------------
|
| -// StopRawOutputFileRecording
|
| -// ----------------------------------------------------------------------------
|
| -
|
| -int32_t AudioDeviceModuleImpl::StopRawOutputFileRecording() {
|
| - LOG(INFO) << __FUNCTION__;
|
| - CHECK_INITIALIZED();
|
| -
|
| - return (_audioDeviceBuffer.StopOutputFileRecording());
|
| -}
|
| -
|
| -// ----------------------------------------------------------------------------
|
| -// SetPlayoutBuffer
|
| -// ----------------------------------------------------------------------------
|
| -
|
| -int32_t AudioDeviceModuleImpl::SetPlayoutBuffer(const BufferType type,
|
| - uint16_t sizeMS) {
|
| - if (type == kFixedBufferSize) {
|
| - LOG(INFO) << __FUNCTION__ << "(fixed buffer, " << sizeMS << "ms)";
|
| - } else if (type == kAdaptiveBufferSize) {
|
| - LOG(INFO) << __FUNCTION__ << "(adaptive buffer, " << sizeMS << "ms)";
|
| - } else {
|
| - LOG(INFO) << __FUNCTION__ << "(?, " << sizeMS << "ms)";
|
| - }
|
| - CHECK_INITIALIZED();
|
| -
|
| - if (_ptrAudioDevice->PlayoutIsInitialized()) {
|
| - LOG(LERROR) << "unable to modify the playout buffer while playing side is "
|
| - "initialized";
|
| - return -1;
|
| - }
|
| -
|
| - int32_t ret(0);
|
| -
|
| - if (kFixedBufferSize == type) {
|
| - if (sizeMS < kAdmMinPlayoutBufferSizeMs ||
|
| - sizeMS > kAdmMaxPlayoutBufferSizeMs) {
|
| - LOG(LERROR) << "size parameter is out of range";
|
| - return -1;
|
| - }
|
| - }
|
| -
|
| - if ((ret = _ptrAudioDevice->SetPlayoutBuffer(type, sizeMS)) == -1) {
|
| - LOG(LERROR) << "failed to set the playout buffer (error: " << LastError()
|
| - << ")";
|
| - }
|
| -
|
| - return ret;
|
| -}
|
| -
|
| -// ----------------------------------------------------------------------------
|
| -// PlayoutBuffer
|
| -// ----------------------------------------------------------------------------
|
| -
|
| -int32_t AudioDeviceModuleImpl::PlayoutBuffer(BufferType* type,
|
| - uint16_t* sizeMS) const {
|
| - LOG(INFO) << __FUNCTION__;
|
| - CHECK_INITIALIZED();
|
| -
|
| - BufferType bufType;
|
| - uint16_t size(0);
|
| -
|
| - if (_ptrAudioDevice->PlayoutBuffer(bufType, size) == -1) {
|
| - LOG(LERROR) << "failed to retrieve the buffer type and size";
|
| - return -1;
|
| - }
|
| -
|
| - *type = bufType;
|
| - *sizeMS = size;
|
| -
|
| - LOG(INFO) << "output: type = " << *type << ", sizeMS = " << *sizeMS;
|
| - return (0);
|
| -}
|
| -
|
| // ----------------------------------------------------------------------------
|
| // PlayoutDelay
|
| // ----------------------------------------------------------------------------
|
| @@ -1587,26 +1382,6 @@ int32_t AudioDeviceModuleImpl::RecordingDelay(uint16_t* delayMS) const {
|
| return (0);
|
| }
|
|
|
| -// ----------------------------------------------------------------------------
|
| -// CPULoad
|
| -// ----------------------------------------------------------------------------
|
| -
|
| -int32_t AudioDeviceModuleImpl::CPULoad(uint16_t* load) const {
|
| - LOG(INFO) << __FUNCTION__;
|
| - CHECK_INITIALIZED();
|
| -
|
| - uint16_t cpuLoad(0);
|
| -
|
| - if (_ptrAudioDevice->CPULoad(cpuLoad) == -1) {
|
| - LOG(LERROR) << "failed to retrieve the CPU load";
|
| - return -1;
|
| - }
|
| -
|
| - *load = cpuLoad;
|
| - LOG(INFO) << "output: " << *load;
|
| - return (0);
|
| -}
|
| -
|
| // ----------------------------------------------------------------------------
|
| // SetRecordingSampleRate
|
| // ----------------------------------------------------------------------------
|
| @@ -1681,16 +1456,6 @@ int32_t AudioDeviceModuleImpl::PlayoutSampleRate(
|
| return (0);
|
| }
|
|
|
| -// ----------------------------------------------------------------------------
|
| -// ResetAudioDevice
|
| -// ----------------------------------------------------------------------------
|
| -
|
| -int32_t AudioDeviceModuleImpl::ResetAudioDevice() {
|
| - LOG(INFO) << __FUNCTION__;
|
| - FATAL() << "Should never be called";
|
| - return -1;
|
| -}
|
| -
|
| // ----------------------------------------------------------------------------
|
| // SetLoudspeakerStatus
|
| // ----------------------------------------------------------------------------
|
|
|