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 |
11 #include <assert.h> | 11 #include <assert.h> |
12 | 12 |
13 #include "webrtc/modules/audio_device/audio_device_config.h" | 13 #include "webrtc/modules/audio_device/audio_device_config.h" |
14 #include "webrtc/modules/audio_device/linux/audio_device_alsa_linux.h" | 14 #include "webrtc/modules/audio_device/linux/audio_device_alsa_linux.h" |
15 | 15 |
16 #include "webrtc/system_wrappers/interface/event_wrapper.h" | 16 #include "webrtc/system_wrappers/include/event_wrapper.h" |
17 #include "webrtc/system_wrappers/interface/sleep.h" | 17 #include "webrtc/system_wrappers/include/sleep.h" |
18 #include "webrtc/system_wrappers/interface/trace.h" | 18 #include "webrtc/system_wrappers/include/trace.h" |
19 | 19 |
20 webrtc_adm_linux_alsa::AlsaSymbolTable AlsaSymbolTable; | 20 webrtc_adm_linux_alsa::AlsaSymbolTable AlsaSymbolTable; |
21 | 21 |
22 // Accesses ALSA functions through our late-binding symbol table instead of | 22 // Accesses ALSA functions through our late-binding symbol table instead of |
23 // directly. This way we don't have to link to libasound, which means our binary | 23 // directly. This way we don't have to link to libasound, which means our binary |
24 // will work on systems that don't have it. | 24 // will work on systems that don't have it. |
25 #define LATE(sym) \ | 25 #define LATE(sym) \ |
26 LATESYM_GET(webrtc_adm_linux_alsa::AlsaSymbolTable, &AlsaSymbolTable, sym) | 26 LATESYM_GET(webrtc_adm_linux_alsa::AlsaSymbolTable, &AlsaSymbolTable, sym) |
27 | 27 |
28 // Redefine these here to be able to do late-binding | 28 // Redefine these here to be able to do late-binding |
(...skipping 2209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2238 state |= (szKey[i] ^ _oldKeyState[i]) & szKey[i]; | 2238 state |= (szKey[i] ^ _oldKeyState[i]) & szKey[i]; |
2239 | 2239 |
2240 // Save old state | 2240 // Save old state |
2241 memcpy((char*)_oldKeyState, (char*)szKey, sizeof(_oldKeyState)); | 2241 memcpy((char*)_oldKeyState, (char*)szKey, sizeof(_oldKeyState)); |
2242 return (state != 0); | 2242 return (state != 0); |
2243 #else | 2243 #else |
2244 return false; | 2244 return false; |
2245 #endif | 2245 #endif |
2246 } | 2246 } |
2247 } // namespace webrtc | 2247 } // namespace webrtc |
OLD | NEW |