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 873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
884 return -1; | 884 return -1; |
885 } | 885 } |
886 | 886 |
887 stepSize = delta; | 887 stepSize = delta; |
888 | 888 |
889 return 0; | 889 return 0; |
890 } | 890 } |
891 | 891 |
892 int16_t AudioDeviceLinuxPulse::PlayoutDevices() | 892 int16_t AudioDeviceLinuxPulse::PlayoutDevices() |
893 { | 893 { |
894 DCHECK(thread_checker_.CalledOnValidThread()); | |
895 PaLock(); | 894 PaLock(); |
896 | 895 |
897 pa_operation* paOperation = NULL; | 896 pa_operation* paOperation = NULL; |
898 _numPlayDevices = 1; // init to 1 to account for "default" | 897 _numPlayDevices = 1; // init to 1 to account for "default" |
899 | 898 |
900 // get the whole list of devices and update _numPlayDevices | 899 // get the whole list of devices and update _numPlayDevices |
901 paOperation = LATE(pa_context_get_sink_info_list)(_paContext, | 900 paOperation = LATE(pa_context_get_sink_info_list)(_paContext, |
902 PaSinkInfoCallback, | 901 PaSinkInfoCallback, |
903 this); | 902 this); |
904 | 903 |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1022 | 1021 |
1023 // Clear device name and index | 1022 // Clear device name and index |
1024 _recDisplayDeviceName = NULL; | 1023 _recDisplayDeviceName = NULL; |
1025 _deviceIndex = -1; | 1024 _deviceIndex = -1; |
1026 | 1025 |
1027 return 0; | 1026 return 0; |
1028 } | 1027 } |
1029 | 1028 |
1030 int16_t AudioDeviceLinuxPulse::RecordingDevices() | 1029 int16_t AudioDeviceLinuxPulse::RecordingDevices() |
1031 { | 1030 { |
1032 DCHECK(thread_checker_.CalledOnValidThread()); | |
1033 PaLock(); | 1031 PaLock(); |
1034 | 1032 |
1035 pa_operation* paOperation = NULL; | 1033 pa_operation* paOperation = NULL; |
1036 _numRecDevices = 1; // Init to 1 to account for "default" | 1034 _numRecDevices = 1; // Init to 1 to account for "default" |
1037 | 1035 |
1038 // Get the whole list of devices and update _numRecDevices | 1036 // Get the whole list of devices and update _numRecDevices |
1039 paOperation = LATE(pa_context_get_source_info_list)(_paContext, | 1037 paOperation = LATE(pa_context_get_source_info_list)(_paContext, |
1040 PaSourceInfoCallback, | 1038 PaSourceInfoCallback, |
1041 this); | 1039 this); |
1042 | 1040 |
(...skipping 1972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3015 | 3013 |
3016 // A bit change in keymap means a key is pressed | 3014 // A bit change in keymap means a key is pressed |
3017 for (i = 0; i < sizeof(szKey); i++) | 3015 for (i = 0; i < sizeof(szKey); i++) |
3018 state |= (szKey[i] ^ _oldKeyState[i]) & szKey[i]; | 3016 state |= (szKey[i] ^ _oldKeyState[i]) & szKey[i]; |
3019 | 3017 |
3020 // Save old state | 3018 // Save old state |
3021 memcpy((char*)_oldKeyState, (char*)szKey, sizeof(_oldKeyState)); | 3019 memcpy((char*)_oldKeyState, (char*)szKey, sizeof(_oldKeyState)); |
3022 return (state != 0); | 3020 return (state != 0); |
3023 } | 3021 } |
3024 } | 3022 } |
OLD | NEW |