OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_USB_MIDI_OUTPUT_STREAM_H_ | 5 #ifndef MEDIA_MIDI_USB_MIDI_OUTPUT_STREAM_H_ |
6 #define MEDIA_MIDI_USB_MIDI_OUTPUT_STREAM_H_ | 6 #define MEDIA_MIDI_USB_MIDI_OUTPUT_STREAM_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "media/midi/usb_midi_export.h" | 14 #include "media/midi/usb_midi_export.h" |
15 #include "media/midi/usb_midi_jack.h" | 15 #include "media/midi/usb_midi_jack.h" |
16 | 16 |
17 namespace media { | |
18 namespace midi { | 17 namespace midi { |
19 | 18 |
20 // UsbMidiOutputStream converts MIDI data to USB-MIDI data. | 19 // UsbMidiOutputStream converts MIDI data to USB-MIDI data. |
21 // See "USB Device Class Definition for MIDI Devices" Release 1.0, | 20 // See "USB Device Class Definition for MIDI Devices" Release 1.0, |
22 // Section 4 "USB-MIDI Event Packets" for details. | 21 // Section 4 "USB-MIDI Event Packets" for details. |
23 class USB_MIDI_EXPORT UsbMidiOutputStream { | 22 class USB_MIDI_EXPORT UsbMidiOutputStream { |
24 public: | 23 public: |
25 explicit UsbMidiOutputStream(const UsbMidiJack& jack); | 24 explicit UsbMidiOutputStream(const UsbMidiJack& jack); |
26 | 25 |
27 // Converts |data| to USB-MIDI data and send it to the jack. | 26 // Converts |data| to USB-MIDI data and send it to the jack. |
(...skipping 22 matching lines...) Expand all Loading... |
50 | 49 |
51 UsbMidiJack jack_; | 50 UsbMidiJack jack_; |
52 size_t pending_size_; | 51 size_t pending_size_; |
53 uint8_t pending_data_[kPacketContentSize]; | 52 uint8_t pending_data_[kPacketContentSize]; |
54 bool is_sending_sysex_; | 53 bool is_sending_sysex_; |
55 | 54 |
56 DISALLOW_COPY_AND_ASSIGN(UsbMidiOutputStream); | 55 DISALLOW_COPY_AND_ASSIGN(UsbMidiOutputStream); |
57 }; | 56 }; |
58 | 57 |
59 } // namespace midi | 58 } // namespace midi |
60 } // namespace media | |
61 | 59 |
62 #endif // MEDIA_MIDI_USB_MIDI_OUTPUT_STREAM_H_ | 60 #endif // MEDIA_MIDI_USB_MIDI_OUTPUT_STREAM_H_ |
OLD | NEW |