OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "media/midi/midi_manager_win.h" | 5 #include "media/midi/midi_manager_win.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <ks.h> | 8 #include <ks.h> |
9 #include <ksmedia.h> | 9 #include <ksmedia.h> |
10 #include <mmreg.h> | 10 #include <mmreg.h> |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 #include "base/timer/timer.h" | 42 #include "base/timer/timer.h" |
43 #include "base/win/message_window.h" | 43 #include "base/win/message_window.h" |
44 #include "base/win/windows_version.h" | 44 #include "base/win/windows_version.h" |
45 #include "device/usb/usb_ids.h" | 45 #include "device/usb/usb_ids.h" |
46 #include "media/midi/midi_manager_winrt.h" | 46 #include "media/midi/midi_manager_winrt.h" |
47 #include "media/midi/midi_message_queue.h" | 47 #include "media/midi/midi_message_queue.h" |
48 #include "media/midi/midi_message_util.h" | 48 #include "media/midi/midi_message_util.h" |
49 #include "media/midi/midi_port_info.h" | 49 #include "media/midi/midi_port_info.h" |
50 #include "media/midi/midi_switches.h" | 50 #include "media/midi/midi_switches.h" |
51 | 51 |
52 namespace media { | |
53 namespace midi { | 52 namespace midi { |
54 namespace { | 53 namespace { |
55 | 54 |
56 static const size_t kBufferLength = 32 * 1024; | 55 static const size_t kBufferLength = 32 * 1024; |
57 | 56 |
58 // We assume that nullpter represents an invalid MIDI handle. | 57 // We assume that nullpter represents an invalid MIDI handle. |
59 const HMIDIIN kInvalidMidiInHandle = nullptr; | 58 const HMIDIIN kInvalidMidiInHandle = nullptr; |
60 const HMIDIOUT kInvalidMidiOutHandle = nullptr; | 59 const HMIDIOUT kInvalidMidiOutHandle = nullptr; |
61 | 60 |
62 std::string GetInErrorMessage(MMRESULT result) { | 61 std::string GetInErrorMessage(MMRESULT result) { |
(...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1194 | 1193 |
1195 MidiManager* MidiManager::Create() { | 1194 MidiManager* MidiManager::Create() { |
1196 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( | 1195 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
1197 switches::kDisableWinrtMidiApi) && | 1196 switches::kDisableWinrtMidiApi) && |
1198 base::win::GetVersion() >= base::win::VERSION_WIN10) | 1197 base::win::GetVersion() >= base::win::VERSION_WIN10) |
1199 return new MidiManagerWinrt(); | 1198 return new MidiManagerWinrt(); |
1200 return new MidiManagerWin(); | 1199 return new MidiManagerWin(); |
1201 } | 1200 } |
1202 | 1201 |
1203 } // namespace midi | 1202 } // namespace midi |
1204 } // namespace media | |
OLD | NEW |