OLD | NEW |
---|---|
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #ifndef MEDIA_MIDI_MIDI_MANAGER_MAC_H_ | 5 #ifndef MEDIA_MIDI_MIDI_MANAGER_MAC_H_ |
6 #define MEDIA_MIDI_MIDI_MANAGER_MAC_H_ | 6 #define MEDIA_MIDI_MIDI_MANAGER_MAC_H_ |
7 | 7 |
8 #include <CoreMIDI/MIDIServices.h> | 8 #include <CoreMIDI/MIDIServices.h> |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
11 #include <vector> | |
11 | 12 |
12 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
13 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
14 #include "media/midi/midi_manager.h" | 15 #include "media/midi/midi_manager.h" |
15 #include "media/midi/midi_port_info.h" | 16 #include "media/midi/midi_port_info.h" |
16 | 17 |
17 namespace media { | 18 namespace media { |
18 | 19 |
19 class MEDIA_EXPORT MIDIManagerMac : public MIDIManager { | 20 class MEDIA_EXPORT MIDIManagerMac : public MIDIManager { |
20 public: | 21 public: |
21 MIDIManagerMac(); | 22 MIDIManagerMac(); |
22 virtual ~MIDIManagerMac(); | 23 virtual ~MIDIManagerMac(); |
23 | 24 |
24 // MIDIManager implementation. | 25 // MIDIManager implementation. |
25 virtual bool Initialize() OVERRIDE; | 26 virtual bool Initialize() OVERRIDE; |
26 virtual void SendMIDIData(MIDIManagerClient* client, | 27 virtual void SendMIDIData(MIDIManagerClient* client, |
27 int port_index, | 28 unsigned int port_index, |
scherkus (not reviewing)
2013/08/21 17:46:29
nit: while unsigned is prevalent in blink, this sh
Takashi Toyoshima
2013/08/22 05:47:45
Done.
palmer
2013/08/22 18:25:41
There is a fun thing here. It can often make sense
| |
28 const uint8* data, | 29 const std::vector<uint8>& data, |
29 size_t length, | |
30 double timestamp) OVERRIDE; | 30 double timestamp) OVERRIDE; |
31 | 31 |
32 private: | 32 private: |
33 // CoreMIDI callback for MIDI data. | 33 // CoreMIDI callback for MIDI data. |
34 // Each callback can contain multiple packets, each of which can contain | 34 // Each callback can contain multiple packets, each of which can contain |
35 // multiple MIDI messages. | 35 // multiple MIDI messages. |
36 static void ReadMidiDispatch( | 36 static void ReadMidiDispatch( |
37 const MIDIPacketList *pktlist, | 37 const MIDIPacketList *pktlist, |
38 void *read_proc_refcon, | 38 void *read_proc_refcon, |
39 void *src_conn_refcon); | 39 void *src_conn_refcon); |
(...skipping 21 matching lines...) Expand all Loading... | |
61 | 61 |
62 // Keeps track of all destinations. | 62 // Keeps track of all destinations. |
63 std::vector<MIDIEndpointRef> destinations_; | 63 std::vector<MIDIEndpointRef> destinations_; |
64 | 64 |
65 DISALLOW_COPY_AND_ASSIGN(MIDIManagerMac); | 65 DISALLOW_COPY_AND_ASSIGN(MIDIManagerMac); |
66 }; | 66 }; |
67 | 67 |
68 } // namespace media | 68 } // namespace media |
69 | 69 |
70 #endif // MEDIA_MIDI_MIDI_MANAGER_MAC_H_ | 70 #endif // MEDIA_MIDI_MIDI_MANAGER_MAC_H_ |
OLD | NEW |