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 29 matching lines...) Expand all Loading... |
40 #include "base/threading/thread_checker.h" | 40 #include "base/threading/thread_checker.h" |
41 #include "base/timer/timer.h" | 41 #include "base/timer/timer.h" |
42 #include "base/win/message_window.h" | 42 #include "base/win/message_window.h" |
43 #include "device/usb/usb_ids.h" | 43 #include "device/usb/usb_ids.h" |
44 #include "media/midi/midi_manager.h" | 44 #include "media/midi/midi_manager.h" |
45 #include "media/midi/midi_message_queue.h" | 45 #include "media/midi/midi_message_queue.h" |
46 #include "media/midi/midi_message_util.h" | 46 #include "media/midi/midi_message_util.h" |
47 #include "media/midi/midi_port_info.h" | 47 #include "media/midi/midi_port_info.h" |
48 | 48 |
49 namespace media { | 49 namespace media { |
| 50 namespace midi { |
50 namespace { | 51 namespace { |
51 | 52 |
52 static const size_t kBufferLength = 32 * 1024; | 53 static const size_t kBufferLength = 32 * 1024; |
53 | 54 |
54 // We assume that nullpter represents an invalid MIDI handle. | 55 // We assume that nullpter represents an invalid MIDI handle. |
55 const HMIDIIN kInvalidMidiInHandle = nullptr; | 56 const HMIDIIN kInvalidMidiInHandle = nullptr; |
56 const HMIDIOUT kInvalidMidiOutHandle = nullptr; | 57 const HMIDIOUT kInvalidMidiOutHandle = nullptr; |
57 | 58 |
58 std::string GetInErrorMessage(MMRESULT result) { | 59 std::string GetInErrorMessage(MMRESULT result) { |
59 wchar_t text[MAXERRORLENGTH]; | 60 wchar_t text[MAXERRORLENGTH]; |
(...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1123 | 1124 |
1124 // TOOD(toyoshim): This calculation should be done when the date is actually | 1125 // TOOD(toyoshim): This calculation should be done when the date is actually |
1125 // sent. | 1126 // sent. |
1126 client->AccumulateMidiBytesSent(data.size()); | 1127 client->AccumulateMidiBytesSent(data.size()); |
1127 } | 1128 } |
1128 | 1129 |
1129 MidiManager* MidiManager::Create() { | 1130 MidiManager* MidiManager::Create() { |
1130 return new MidiManagerWin(); | 1131 return new MidiManagerWin(); |
1131 } | 1132 } |
1132 | 1133 |
| 1134 } // namespace midi |
1133 } // namespace media | 1135 } // namespace media |
OLD | NEW |