| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #include "webrtc/base/refcount.h" | 11 #include "webrtc/base/refcount.h" |
| 12 #include "webrtc/base/trace_event.h" |
| 12 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar
y.h" | 13 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar
y.h" |
| 13 #include "webrtc/modules/audio_device/audio_device_config.h" | 14 #include "webrtc/modules/audio_device/audio_device_config.h" |
| 14 #include "webrtc/modules/audio_device/audio_device_impl.h" | 15 #include "webrtc/modules/audio_device/audio_device_impl.h" |
| 15 #include "webrtc/system_wrappers/include/tick_util.h" | 16 #include "webrtc/system_wrappers/include/tick_util.h" |
| 16 | 17 |
| 17 #include <assert.h> | 18 #include <assert.h> |
| 18 #include <string.h> | 19 #include <string.h> |
| 19 | 20 |
| 20 #if defined(_WIN32) | 21 #if defined(_WIN32) |
| 21 #include "audio_device_wave_win.h" | 22 #include "audio_device_wave_win.h" |
| (...skipping 1425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1447 _audioDeviceBuffer.InitPlayout(); | 1448 _audioDeviceBuffer.InitPlayout(); |
| 1448 return (_ptrAudioDevice->InitPlayout()); | 1449 return (_ptrAudioDevice->InitPlayout()); |
| 1449 } | 1450 } |
| 1450 | 1451 |
| 1451 // ---------------------------------------------------------------------------- | 1452 // ---------------------------------------------------------------------------- |
| 1452 // InitRecording | 1453 // InitRecording |
| 1453 // ---------------------------------------------------------------------------- | 1454 // ---------------------------------------------------------------------------- |
| 1454 | 1455 |
| 1455 int32_t AudioDeviceModuleImpl::InitRecording() | 1456 int32_t AudioDeviceModuleImpl::InitRecording() |
| 1456 { | 1457 { |
| 1458 TRACE_EVENT0("webrtc", "AudioDeviceModuleImpl::InitRecording"); |
| 1457 CHECK_INITIALIZED(); | 1459 CHECK_INITIALIZED(); |
| 1458 _audioDeviceBuffer.InitRecording(); | 1460 _audioDeviceBuffer.InitRecording(); |
| 1459 return (_ptrAudioDevice->InitRecording()); | 1461 return (_ptrAudioDevice->InitRecording()); |
| 1460 } | 1462 } |
| 1461 | 1463 |
| 1462 // ---------------------------------------------------------------------------- | 1464 // ---------------------------------------------------------------------------- |
| 1463 // PlayoutIsInitialized | 1465 // PlayoutIsInitialized |
| 1464 // ---------------------------------------------------------------------------- | 1466 // ---------------------------------------------------------------------------- |
| 1465 | 1467 |
| 1466 bool AudioDeviceModuleImpl::PlayoutIsInitialized() const | 1468 bool AudioDeviceModuleImpl::PlayoutIsInitialized() const |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1508 CHECK_INITIALIZED_BOOL(); | 1510 CHECK_INITIALIZED_BOOL(); |
| 1509 return (_ptrAudioDevice->Playing()); | 1511 return (_ptrAudioDevice->Playing()); |
| 1510 } | 1512 } |
| 1511 | 1513 |
| 1512 // ---------------------------------------------------------------------------- | 1514 // ---------------------------------------------------------------------------- |
| 1513 // StartRecording | 1515 // StartRecording |
| 1514 // ---------------------------------------------------------------------------- | 1516 // ---------------------------------------------------------------------------- |
| 1515 | 1517 |
| 1516 int32_t AudioDeviceModuleImpl::StartRecording() | 1518 int32_t AudioDeviceModuleImpl::StartRecording() |
| 1517 { | 1519 { |
| 1520 TRACE_EVENT0("webrtc", "AudioDeviceModuleImpl::StartRecording"); |
| 1518 CHECK_INITIALIZED(); | 1521 CHECK_INITIALIZED(); |
| 1519 return (_ptrAudioDevice->StartRecording()); | 1522 return (_ptrAudioDevice->StartRecording()); |
| 1520 } | 1523 } |
| 1521 // ---------------------------------------------------------------------------- | 1524 // ---------------------------------------------------------------------------- |
| 1522 // StopRecording | 1525 // StopRecording |
| 1523 // ---------------------------------------------------------------------------- | 1526 // ---------------------------------------------------------------------------- |
| 1524 | 1527 |
| 1525 int32_t AudioDeviceModuleImpl::StopRecording() | 1528 int32_t AudioDeviceModuleImpl::StopRecording() |
| 1526 { | 1529 { |
| 1527 CHECK_INITIALIZED(); | 1530 CHECK_INITIALIZED(); |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1927 // ---------------------------------------------------------------------------- | 1930 // ---------------------------------------------------------------------------- |
| 1928 // PlatformAudioLayer | 1931 // PlatformAudioLayer |
| 1929 // ---------------------------------------------------------------------------- | 1932 // ---------------------------------------------------------------------------- |
| 1930 | 1933 |
| 1931 AudioDeviceModule::AudioLayer AudioDeviceModuleImpl::PlatformAudioLayer() const | 1934 AudioDeviceModule::AudioLayer AudioDeviceModuleImpl::PlatformAudioLayer() const |
| 1932 { | 1935 { |
| 1933 return _platformAudioLayer; | 1936 return _platformAudioLayer; |
| 1934 } | 1937 } |
| 1935 | 1938 |
| 1936 } // namespace webrtc | 1939 } // namespace webrtc |
| OLD | NEW |