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 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 if (_ptrAudioDevice->SpeakerVolume(level) == -1) { | 569 if (_ptrAudioDevice->SpeakerVolume(level) == -1) { |
570 return -1; | 570 return -1; |
571 } | 571 } |
572 | 572 |
573 *volume = level; | 573 *volume = level; |
574 LOG(INFO) << "output: " << *volume; | 574 LOG(INFO) << "output: " << *volume; |
575 return (0); | 575 return (0); |
576 } | 576 } |
577 | 577 |
578 // ---------------------------------------------------------------------------- | 578 // ---------------------------------------------------------------------------- |
579 // SetWaveOutVolume | |
580 // ---------------------------------------------------------------------------- | |
581 | |
582 int32_t AudioDeviceModuleImpl::SetWaveOutVolume(uint16_t volumeLeft, | |
583 uint16_t volumeRight) { | |
584 LOG(INFO) << __FUNCTION__ << "(" << volumeLeft << ", " << volumeRight << ")"; | |
585 CHECK_INITIALIZED(); | |
586 return (_ptrAudioDevice->SetWaveOutVolume(volumeLeft, volumeRight)); | |
587 } | |
588 | |
589 // ---------------------------------------------------------------------------- | |
590 // WaveOutVolume | |
591 // ---------------------------------------------------------------------------- | |
592 | |
593 int32_t AudioDeviceModuleImpl::WaveOutVolume(uint16_t* volumeLeft, | |
594 uint16_t* volumeRight) const { | |
595 LOG(INFO) << __FUNCTION__; | |
596 CHECK_INITIALIZED(); | |
597 | |
598 uint16_t volLeft(0); | |
599 uint16_t volRight(0); | |
600 | |
601 if (_ptrAudioDevice->WaveOutVolume(volLeft, volRight) == -1) { | |
602 return -1; | |
603 } | |
604 | |
605 *volumeLeft = volLeft; | |
606 *volumeRight = volRight; | |
607 LOG(INFO) << "output: " << *volumeLeft << ", " << *volumeRight; | |
608 | |
609 return (0); | |
610 } | |
611 | |
612 // ---------------------------------------------------------------------------- | |
613 // SpeakerIsInitialized | 579 // SpeakerIsInitialized |
614 // ---------------------------------------------------------------------------- | 580 // ---------------------------------------------------------------------------- |
615 | 581 |
616 bool AudioDeviceModuleImpl::SpeakerIsInitialized() const { | 582 bool AudioDeviceModuleImpl::SpeakerIsInitialized() const { |
617 LOG(INFO) << __FUNCTION__; | 583 LOG(INFO) << __FUNCTION__; |
618 CHECK_INITIALIZED_BOOL(); | 584 CHECK_INITIALIZED_BOOL(); |
619 | 585 |
620 bool isInitialized = _ptrAudioDevice->SpeakerIsInitialized(); | 586 bool isInitialized = _ptrAudioDevice->SpeakerIsInitialized(); |
621 LOG(INFO) << "output: " << isInitialized; | 587 LOG(INFO) << "output: " << isInitialized; |
622 return (isInitialized); | 588 return (isInitialized); |
(...skipping 1215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1838 // PlatformAudioLayer | 1804 // PlatformAudioLayer |
1839 // ---------------------------------------------------------------------------- | 1805 // ---------------------------------------------------------------------------- |
1840 | 1806 |
1841 AudioDeviceModule::AudioLayer AudioDeviceModuleImpl::PlatformAudioLayer() | 1807 AudioDeviceModule::AudioLayer AudioDeviceModuleImpl::PlatformAudioLayer() |
1842 const { | 1808 const { |
1843 LOG(INFO) << __FUNCTION__; | 1809 LOG(INFO) << __FUNCTION__; |
1844 return _platformAudioLayer; | 1810 return _platformAudioLayer; |
1845 } | 1811 } |
1846 | 1812 |
1847 } // namespace webrtc | 1813 } // namespace webrtc |
OLD | NEW |