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 17 matching lines...) Expand all Loading... |
28 #include <string.h> | 28 #include <string.h> |
29 | 29 |
30 #include <windows.h> | 30 #include <windows.h> |
31 #include <comdef.h> | 31 #include <comdef.h> |
32 #include <dmo.h> | 32 #include <dmo.h> |
33 #include <Functiondiscoverykeys_devpkey.h> | 33 #include <Functiondiscoverykeys_devpkey.h> |
34 #include <mmsystem.h> | 34 #include <mmsystem.h> |
35 #include <strsafe.h> | 35 #include <strsafe.h> |
36 #include <uuids.h> | 36 #include <uuids.h> |
37 | 37 |
38 #include "webrtc/base/logging.h" | 38 #include "webrtc/rtc_base/logging.h" |
39 #include "webrtc/base/platform_thread.h" | 39 #include "webrtc/rtc_base/platform_thread.h" |
40 #include "webrtc/system_wrappers/include/sleep.h" | 40 #include "webrtc/system_wrappers/include/sleep.h" |
41 #include "webrtc/system_wrappers/include/trace.h" | 41 #include "webrtc/system_wrappers/include/trace.h" |
42 | 42 |
43 // Macro that calls a COM method returning HRESULT value. | 43 // Macro that calls a COM method returning HRESULT value. |
44 #define EXIT_ON_ERROR(hres) do { if (FAILED(hres)) goto Exit; } while(0) | 44 #define EXIT_ON_ERROR(hres) do { if (FAILED(hres)) goto Exit; } while(0) |
45 | 45 |
46 // Macro that continues to a COM error. | 46 // Macro that continues to a COM error. |
47 #define CONTINUE_ON_ERROR(hres) do { if (FAILED(hres)) goto Next; } while(0) | 47 #define CONTINUE_ON_ERROR(hres) do { if (FAILED(hres)) goto Next; } while(0) |
48 | 48 |
49 // Macro that releases a COM object if not NULL. | 49 // Macro that releases a COM object if not NULL. |
(...skipping 5067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5117 int key_down = 0; | 5117 int key_down = 0; |
5118 for (int key = VK_SPACE; key < VK_NUMLOCK; key++) { | 5118 for (int key = VK_SPACE; key < VK_NUMLOCK; key++) { |
5119 short res = GetAsyncKeyState(key); | 5119 short res = GetAsyncKeyState(key); |
5120 key_down |= res & 0x1; // Get the LSB | 5120 key_down |= res & 0x1; // Get the LSB |
5121 } | 5121 } |
5122 return (key_down > 0); | 5122 return (key_down > 0); |
5123 } | 5123 } |
5124 } // namespace webrtc | 5124 } // namespace webrtc |
5125 | 5125 |
5126 #endif // WEBRTC_WINDOWS_CORE_AUDIO_BUILD | 5126 #endif // WEBRTC_WINDOWS_CORE_AUDIO_BUILD |
OLD | NEW |