diff options
Diffstat (limited to 'chromium/third_party/webrtc/modules/audio_device/audio_device_impl.cc')
-rw-r--r-- | chromium/third_party/webrtc/modules/audio_device/audio_device_impl.cc | 58 |
1 files changed, 14 insertions, 44 deletions
diff --git a/chromium/third_party/webrtc/modules/audio_device/audio_device_impl.cc b/chromium/third_party/webrtc/modules/audio_device/audio_device_impl.cc index 05201c0e2a5..58411e3b94d 100644 --- a/chromium/third_party/webrtc/modules/audio_device/audio_device_impl.cc +++ b/chromium/third_party/webrtc/modules/audio_device/audio_device_impl.cc @@ -45,8 +45,14 @@ #include "audio_device_utility_mac.h" #include "audio_device_mac.h" #endif + +#if defined(WEBRTC_DUMMY_FILE_DEVICES) +#include "webrtc/modules/audio_device/dummy/file_audio_device_factory.h" +#endif + #include "webrtc/modules/audio_device/dummy/audio_device_dummy.h" #include "webrtc/modules/audio_device/dummy/audio_device_utility_dummy.h" +#include "webrtc/modules/audio_device/dummy/file_audio_device.h" #include "webrtc/system_wrappers/interface/critical_section_wrapper.h" #include "webrtc/system_wrappers/interface/trace.h" @@ -203,6 +209,14 @@ int32_t AudioDeviceModuleImpl::CreatePlatformSpecificObjects() { ptrAudioDeviceUtility = new AudioDeviceUtilityDummy(Id()); } +#elif defined(WEBRTC_DUMMY_FILE_DEVICES) + ptrAudioDevice = FileAudioDeviceFactory::CreateFileAudioDevice(Id()); + WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id, + "Will use file-playing dummy device."); + if (ptrAudioDevice != NULL) + { + ptrAudioDeviceUtility = new AudioDeviceUtilityDummy(Id()); + } #else const AudioLayer audioLayer(PlatformAudioLayer()); @@ -641,27 +655,6 @@ bool AudioDeviceModuleImpl::Initialized() const } // ---------------------------------------------------------------------------- -// SpeakerIsAvailable -// ---------------------------------------------------------------------------- - -int32_t AudioDeviceModuleImpl::SpeakerIsAvailable(bool* available) -{ - CHECK_INITIALIZED(); - - bool isAvailable(0); - - if (_ptrAudioDevice->SpeakerIsAvailable(isAvailable) == -1) - { - return -1; - } - - *available = isAvailable; - - WEBRTC_TRACE(kTraceStateInfo, kTraceAudioDevice, _id, "output: available=%d", available); - return (0); -} - -// ---------------------------------------------------------------------------- // InitSpeaker // ---------------------------------------------------------------------------- @@ -672,27 +665,6 @@ int32_t AudioDeviceModuleImpl::InitSpeaker() } // ---------------------------------------------------------------------------- -// MicrophoneIsAvailable -// ---------------------------------------------------------------------------- - -int32_t AudioDeviceModuleImpl::MicrophoneIsAvailable(bool* available) -{ - CHECK_INITIALIZED(); - - bool isAvailable(0); - - if (_ptrAudioDevice->MicrophoneIsAvailable(isAvailable) == -1) - { - return -1; - } - - *available = isAvailable; - - WEBRTC_TRACE(kTraceStateInfo, kTraceAudioDevice, _id, "output: available=%d", *available); - return (0); -} - -// ---------------------------------------------------------------------------- // InitMicrophone // ---------------------------------------------------------------------------- @@ -1750,8 +1722,6 @@ int32_t AudioDeviceModuleImpl::StopRawOutputFileRecording() CHECK_INITIALIZED(); return (_audioDeviceBuffer.StopOutputFileRecording()); - - return 0; } // ---------------------------------------------------------------------------- |