| Index: modules/audio_device/audio_device_impl.cc
|
| diff --git a/modules/audio_device/audio_device_impl.cc b/modules/audio_device/audio_device_impl.cc
|
| index 820d5f6a46de66ce28b0ec9a0d87977bd355ec6c..5701f5948a065de3e671f2851736b738ec94a60f 100644
|
| --- a/modules/audio_device/audio_device_impl.cc
|
| +++ b/modules/audio_device/audio_device_impl.cc
|
| @@ -116,11 +116,9 @@ rtc::scoped_refptr<AudioDeviceModule> AudioDeviceModule::Create(
|
|
|
| AudioDeviceModuleImpl::AudioDeviceModuleImpl(const int32_t id,
|
| const AudioLayer audioLayer)
|
| - : _ptrCbAudioDeviceObserver(NULL),
|
| - _ptrAudioDevice(NULL),
|
| + : _ptrAudioDevice(NULL),
|
| _id(id),
|
| _platformAudioLayer(audioLayer),
|
| - _lastProcessTime(rtc::TimeMillis()),
|
| _platformType(kPlatformNotSupported),
|
| _initialized(false),
|
| _lastError(kAdmErrNone) {
|
| @@ -359,78 +357,6 @@ AudioDeviceModuleImpl::~AudioDeviceModuleImpl() {
|
| }
|
| }
|
|
|
| -// ============================================================================
|
| -// Module
|
| -// ============================================================================
|
| -
|
| -// ----------------------------------------------------------------------------
|
| -// Module::TimeUntilNextProcess
|
| -//
|
| -// Returns the number of milliseconds until the module want a worker thread
|
| -// to call Process().
|
| -// ----------------------------------------------------------------------------
|
| -
|
| -int64_t AudioDeviceModuleImpl::TimeUntilNextProcess() {
|
| - int64_t now = rtc::TimeMillis();
|
| - int64_t deltaProcess = kAdmMaxIdleTimeProcess - (now - _lastProcessTime);
|
| - return deltaProcess;
|
| -}
|
| -
|
| -// ----------------------------------------------------------------------------
|
| -// Module::Process
|
| -//
|
| -// Check for posted error and warning reports. Generate callbacks if
|
| -// new reports exists.
|
| -// ----------------------------------------------------------------------------
|
| -
|
| -void AudioDeviceModuleImpl::Process() {
|
| - _lastProcessTime = rtc::TimeMillis();
|
| -
|
| - // kPlayoutWarning
|
| - if (_ptrAudioDevice->PlayoutWarning()) {
|
| - rtc::CritScope lock(&_critSectEventCb);
|
| - if (_ptrCbAudioDeviceObserver) {
|
| - LOG(WARNING) << "=> OnWarningIsReported(kPlayoutWarning)";
|
| - _ptrCbAudioDeviceObserver->OnWarningIsReported(
|
| - AudioDeviceObserver::kPlayoutWarning);
|
| - }
|
| - _ptrAudioDevice->ClearPlayoutWarning();
|
| - }
|
| -
|
| - // kPlayoutError
|
| - if (_ptrAudioDevice->PlayoutError()) {
|
| - rtc::CritScope lock(&_critSectEventCb);
|
| - if (_ptrCbAudioDeviceObserver) {
|
| - LOG(LERROR) << "=> OnErrorIsReported(kPlayoutError)";
|
| - _ptrCbAudioDeviceObserver->OnErrorIsReported(
|
| - AudioDeviceObserver::kPlayoutError);
|
| - }
|
| - _ptrAudioDevice->ClearPlayoutError();
|
| - }
|
| -
|
| - // kRecordingWarning
|
| - if (_ptrAudioDevice->RecordingWarning()) {
|
| - rtc::CritScope lock(&_critSectEventCb);
|
| - if (_ptrCbAudioDeviceObserver) {
|
| - LOG(WARNING) << "=> OnWarningIsReported(kRecordingWarning)";
|
| - _ptrCbAudioDeviceObserver->OnWarningIsReported(
|
| - AudioDeviceObserver::kRecordingWarning);
|
| - }
|
| - _ptrAudioDevice->ClearRecordingWarning();
|
| - }
|
| -
|
| - // kRecordingError
|
| - if (_ptrAudioDevice->RecordingError()) {
|
| - rtc::CritScope lock(&_critSectEventCb);
|
| - if (_ptrCbAudioDeviceObserver) {
|
| - LOG(LERROR) << "=> OnErrorIsReported(kRecordingError)";
|
| - _ptrCbAudioDeviceObserver->OnErrorIsReported(
|
| - AudioDeviceObserver::kRecordingError);
|
| - }
|
| - _ptrAudioDevice->ClearRecordingError();
|
| - }
|
| -}
|
| -
|
| // ============================================================================
|
| // Public API
|
| // ============================================================================
|
| @@ -1320,19 +1246,6 @@ bool AudioDeviceModuleImpl::Recording() const {
|
| return (_ptrAudioDevice->Recording());
|
| }
|
|
|
| -// ----------------------------------------------------------------------------
|
| -// RegisterEventObserver
|
| -// ----------------------------------------------------------------------------
|
| -
|
| -int32_t AudioDeviceModuleImpl::RegisterEventObserver(
|
| - AudioDeviceObserver* eventCallback) {
|
| - LOG(INFO) << __FUNCTION__;
|
| - rtc::CritScope lock(&_critSectEventCb);
|
| - _ptrCbAudioDeviceObserver = eventCallback;
|
| -
|
| - return 0;
|
| -}
|
| -
|
| // ----------------------------------------------------------------------------
|
| // RegisterAudioCallback
|
| // ----------------------------------------------------------------------------
|
|
|