| 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 |
| (...skipping 1478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1489 } | 1489 } |
| 1490 | 1490 |
| 1491 // ---------------------------------------------------------------------------- | 1491 // ---------------------------------------------------------------------------- |
| 1492 // RegisterAudioCallback | 1492 // RegisterAudioCallback |
| 1493 // ---------------------------------------------------------------------------- | 1493 // ---------------------------------------------------------------------------- |
| 1494 | 1494 |
| 1495 int32_t AudioDeviceModuleImpl::RegisterAudioCallback( | 1495 int32_t AudioDeviceModuleImpl::RegisterAudioCallback( |
| 1496 AudioTransport* audioCallback) { | 1496 AudioTransport* audioCallback) { |
| 1497 LOG(INFO) << __FUNCTION__; | 1497 LOG(INFO) << __FUNCTION__; |
| 1498 CriticalSectionScoped lock(&_critSectAudioCb); | 1498 CriticalSectionScoped lock(&_critSectAudioCb); |
| 1499 _audioDeviceBuffer.RegisterAudioCallback(audioCallback); | 1499 return _audioDeviceBuffer.RegisterAudioCallback(audioCallback); |
| 1500 | |
| 1501 return 0; | |
| 1502 } | 1500 } |
| 1503 | 1501 |
| 1504 // ---------------------------------------------------------------------------- | 1502 // ---------------------------------------------------------------------------- |
| 1505 // StartRawInputFileRecording | 1503 // StartRawInputFileRecording |
| 1506 // ---------------------------------------------------------------------------- | 1504 // ---------------------------------------------------------------------------- |
| 1507 | 1505 |
| 1508 int32_t AudioDeviceModuleImpl::StartRawInputFileRecording( | 1506 int32_t AudioDeviceModuleImpl::StartRawInputFileRecording( |
| 1509 const char pcmFileNameUTF8[kAdmMaxFileNameSize]) { | 1507 const char pcmFileNameUTF8[kAdmMaxFileNameSize]) { |
| 1510 LOG(INFO) << __FUNCTION__; | 1508 LOG(INFO) << __FUNCTION__; |
| 1511 CHECK_INITIALIZED(); | 1509 CHECK_INITIALIZED(); |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1749 LOG(INFO) << "output: " << *samplesPerSec; | 1747 LOG(INFO) << "output: " << *samplesPerSec; |
| 1750 return (0); | 1748 return (0); |
| 1751 } | 1749 } |
| 1752 | 1750 |
| 1753 // ---------------------------------------------------------------------------- | 1751 // ---------------------------------------------------------------------------- |
| 1754 // ResetAudioDevice | 1752 // ResetAudioDevice |
| 1755 // ---------------------------------------------------------------------------- | 1753 // ---------------------------------------------------------------------------- |
| 1756 | 1754 |
| 1757 int32_t AudioDeviceModuleImpl::ResetAudioDevice() { | 1755 int32_t AudioDeviceModuleImpl::ResetAudioDevice() { |
| 1758 LOG(INFO) << __FUNCTION__; | 1756 LOG(INFO) << __FUNCTION__; |
| 1759 CHECK_INITIALIZED(); | 1757 FATAL() << "Should never be called"; |
| 1760 | 1758 return -1; |
| 1761 if (_ptrAudioDevice->ResetAudioDevice() == -1) { | |
| 1762 return -1; | |
| 1763 } | |
| 1764 | |
| 1765 return (0); | |
| 1766 } | 1759 } |
| 1767 | 1760 |
| 1768 // ---------------------------------------------------------------------------- | 1761 // ---------------------------------------------------------------------------- |
| 1769 // SetLoudspeakerStatus | 1762 // SetLoudspeakerStatus |
| 1770 // ---------------------------------------------------------------------------- | 1763 // ---------------------------------------------------------------------------- |
| 1771 | 1764 |
| 1772 int32_t AudioDeviceModuleImpl::SetLoudspeakerStatus(bool enable) { | 1765 int32_t AudioDeviceModuleImpl::SetLoudspeakerStatus(bool enable) { |
| 1773 LOG(INFO) << __FUNCTION__ << "(" << enable << ")"; | 1766 LOG(INFO) << __FUNCTION__ << "(" << enable << ")"; |
| 1774 CHECK_INITIALIZED(); | 1767 CHECK_INITIALIZED(); |
| 1775 | 1768 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1878 // PlatformAudioLayer | 1871 // PlatformAudioLayer |
| 1879 // ---------------------------------------------------------------------------- | 1872 // ---------------------------------------------------------------------------- |
| 1880 | 1873 |
| 1881 AudioDeviceModule::AudioLayer AudioDeviceModuleImpl::PlatformAudioLayer() | 1874 AudioDeviceModule::AudioLayer AudioDeviceModuleImpl::PlatformAudioLayer() |
| 1882 const { | 1875 const { |
| 1883 LOG(INFO) << __FUNCTION__; | 1876 LOG(INFO) << __FUNCTION__; |
| 1884 return _platformAudioLayer; | 1877 return _platformAudioLayer; |
| 1885 } | 1878 } |
| 1886 | 1879 |
| 1887 } // namespace webrtc | 1880 } // namespace webrtc |
| OLD | NEW |