Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(522)

Side by Side Diff: webrtc/modules/audio_device/audio_device_impl.cc

Issue 2222563002: Fix warnings, simplify ADM. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix IOS compile. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1758 matching lines...) Expand 10 before | Expand all | Expand 10 after
1769 LOG(INFO) << __FUNCTION__; 1769 LOG(INFO) << __FUNCTION__;
1770 CHECK_INITIALIZED(); 1770 CHECK_INITIALIZED();
1771 int32_t ok = 0; 1771 int32_t ok = 0;
1772 if (_ptrAudioDevice->GetLoudspeakerStatus(*enabled) != 0) { 1772 if (_ptrAudioDevice->GetLoudspeakerStatus(*enabled) != 0) {
1773 ok = -1; 1773 ok = -1;
1774 } 1774 }
1775 LOG(INFO) << "output: " << ok; 1775 LOG(INFO) << "output: " << ok;
1776 return ok; 1776 return ok;
1777 } 1777 }
1778 1778
1779 bool AudioDeviceModuleImpl::BuiltInAECIsEnabled() const {
1780 LOG(INFO) << __FUNCTION__;
1781 CHECK_INITIALIZED_BOOL();
1782 bool isEnabled = _ptrAudioDevice->BuiltInAECIsEnabled();
1783 LOG(INFO) << "output: " << isEnabled;
1784 return isEnabled;
1785 }
1786
1787 bool AudioDeviceModuleImpl::BuiltInAECIsAvailable() const { 1779 bool AudioDeviceModuleImpl::BuiltInAECIsAvailable() const {
1788 LOG(INFO) << __FUNCTION__; 1780 LOG(INFO) << __FUNCTION__;
1789 CHECK_INITIALIZED_BOOL(); 1781 CHECK_INITIALIZED_BOOL();
1790 bool isAvailable = _ptrAudioDevice->BuiltInAECIsAvailable(); 1782 bool isAvailable = _ptrAudioDevice->BuiltInAECIsAvailable();
1791 LOG(INFO) << "output: " << isAvailable; 1783 LOG(INFO) << "output: " << isAvailable;
1792 return isAvailable; 1784 return isAvailable;
1793 } 1785 }
1794 1786
1795 int32_t AudioDeviceModuleImpl::EnableBuiltInAEC(bool enable) { 1787 int32_t AudioDeviceModuleImpl::EnableBuiltInAEC(bool enable) {
1796 LOG(INFO) << __FUNCTION__ << "(" << enable << ")"; 1788 LOG(INFO) << __FUNCTION__ << "(" << enable << ")";
(...skipping 28 matching lines...) Expand all
1825 } 1817 }
1826 1818
1827 int32_t AudioDeviceModuleImpl::EnableBuiltInNS(bool enable) { 1819 int32_t AudioDeviceModuleImpl::EnableBuiltInNS(bool enable) {
1828 LOG(INFO) << __FUNCTION__ << "(" << enable << ")"; 1820 LOG(INFO) << __FUNCTION__ << "(" << enable << ")";
1829 CHECK_INITIALIZED(); 1821 CHECK_INITIALIZED();
1830 int32_t ok = _ptrAudioDevice->EnableBuiltInNS(enable); 1822 int32_t ok = _ptrAudioDevice->EnableBuiltInNS(enable);
1831 LOG(INFO) << "output: " << ok; 1823 LOG(INFO) << "output: " << ok;
1832 return ok; 1824 return ok;
1833 } 1825 }
1834 1826
1827 #if defined(WEBRTC_IOS)
1835 int AudioDeviceModuleImpl::GetPlayoutAudioParameters( 1828 int AudioDeviceModuleImpl::GetPlayoutAudioParameters(
1836 AudioParameters* params) const { 1829 AudioParameters* params) const {
1837 LOG(INFO) << __FUNCTION__; 1830 LOG(INFO) << __FUNCTION__;
1838 int r = _ptrAudioDevice->GetPlayoutAudioParameters(params); 1831 int r = _ptrAudioDevice->GetPlayoutAudioParameters(params);
1839 LOG(INFO) << "output: " << r; 1832 LOG(INFO) << "output: " << r;
1840 return r; 1833 return r;
1841 } 1834 }
1842 1835
1843 int AudioDeviceModuleImpl::GetRecordAudioParameters( 1836 int AudioDeviceModuleImpl::GetRecordAudioParameters(
1844 AudioParameters* params) const { 1837 AudioParameters* params) const {
1845 LOG(INFO) << __FUNCTION__; 1838 LOG(INFO) << __FUNCTION__;
1846 int r = _ptrAudioDevice->GetRecordAudioParameters(params); 1839 int r = _ptrAudioDevice->GetRecordAudioParameters(params);
1847 LOG(INFO) << "output: " << r; 1840 LOG(INFO) << "output: " << r;
1848 return r; 1841 return r;
1849 } 1842 }
1843 #endif // WEBRTC_IOS
1850 1844
1851 // ============================================================================ 1845 // ============================================================================
1852 // Private Methods 1846 // Private Methods
1853 // ============================================================================ 1847 // ============================================================================
1854 1848
1855 // ---------------------------------------------------------------------------- 1849 // ----------------------------------------------------------------------------
1856 // Platform 1850 // Platform
1857 // ---------------------------------------------------------------------------- 1851 // ----------------------------------------------------------------------------
1858 1852
1859 AudioDeviceModuleImpl::PlatformType AudioDeviceModuleImpl::Platform() const { 1853 AudioDeviceModuleImpl::PlatformType AudioDeviceModuleImpl::Platform() const {
1860 LOG(INFO) << __FUNCTION__; 1854 LOG(INFO) << __FUNCTION__;
1861 return _platformType; 1855 return _platformType;
1862 } 1856 }
1863 1857
1864 // ---------------------------------------------------------------------------- 1858 // ----------------------------------------------------------------------------
1865 // PlatformAudioLayer 1859 // PlatformAudioLayer
1866 // ---------------------------------------------------------------------------- 1860 // ----------------------------------------------------------------------------
1867 1861
1868 AudioDeviceModule::AudioLayer AudioDeviceModuleImpl::PlatformAudioLayer() 1862 AudioDeviceModule::AudioLayer AudioDeviceModuleImpl::PlatformAudioLayer()
1869 const { 1863 const {
1870 LOG(INFO) << __FUNCTION__; 1864 LOG(INFO) << __FUNCTION__;
1871 return _platformAudioLayer; 1865 return _platformAudioLayer;
1872 } 1866 }
1873 1867
1874 } // namespace webrtc 1868 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_device/audio_device_impl.h ('k') | webrtc/modules/audio_device/include/audio_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698