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 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 uint32_t level(0); | 541 uint32_t level(0); |
542 | 542 |
543 if (_mixerManager.SpeakerVolume(level) == -1) { | 543 if (_mixerManager.SpeakerVolume(level) == -1) { |
544 return -1; | 544 return -1; |
545 } | 545 } |
546 | 546 |
547 volume = level; | 547 volume = level; |
548 return 0; | 548 return 0; |
549 } | 549 } |
550 | 550 |
551 int32_t AudioDeviceMac::SetWaveOutVolume(uint16_t volumeLeft, | |
552 uint16_t volumeRight) { | |
553 LOG(LS_WARNING) << "API call not supported on this platform"; | |
554 return -1; | |
555 } | |
556 | |
557 int32_t AudioDeviceMac::WaveOutVolume(uint16_t& /*volumeLeft*/, | |
558 uint16_t& /*volumeRight*/) const { | |
559 LOG(LS_WARNING) << "API call not supported on this platform"; | |
560 return -1; | |
561 } | |
562 | |
563 int32_t AudioDeviceMac::MaxSpeakerVolume(uint32_t& maxVolume) const { | 551 int32_t AudioDeviceMac::MaxSpeakerVolume(uint32_t& maxVolume) const { |
564 uint32_t maxVol(0); | 552 uint32_t maxVol(0); |
565 | 553 |
566 if (_mixerManager.MaxSpeakerVolume(maxVol) == -1) { | 554 if (_mixerManager.MaxSpeakerVolume(maxVol) == -1) { |
567 return -1; | 555 return -1; |
568 } | 556 } |
569 | 557 |
570 maxVolume = maxVol; | 558 maxVolume = maxVol; |
571 return 0; | 559 return 0; |
572 } | 560 } |
(...skipping 2136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2709 bool keyState = | 2697 bool keyState = |
2710 CGEventSourceKeyState(kCGEventSourceStateHIDSystemState, key_index); | 2698 CGEventSourceKeyState(kCGEventSourceStateHIDSystemState, key_index); |
2711 // A false -> true change in keymap means a key is pressed. | 2699 // A false -> true change in keymap means a key is pressed. |
2712 key_down |= (keyState && !prev_key_state_[key_index]); | 2700 key_down |= (keyState && !prev_key_state_[key_index]); |
2713 // Save current state. | 2701 // Save current state. |
2714 prev_key_state_[key_index] = keyState; | 2702 prev_key_state_[key_index] = keyState; |
2715 } | 2703 } |
2716 return key_down; | 2704 return key_down; |
2717 } | 2705 } |
2718 } // namespace webrtc | 2706 } // namespace webrtc |
OLD | NEW |