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_message_queue.h" | 5 #include "media/midi/midi_message_queue.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "media/midi/midi_message_util.h" | 10 #include "media/midi/midi_message_util.h" |
11 | 11 |
12 namespace media { | |
13 namespace midi { | 12 namespace midi { |
14 namespace { | 13 namespace { |
15 | 14 |
16 const uint8_t kSysEx = 0xf0; | 15 const uint8_t kSysEx = 0xf0; |
17 const uint8_t kEndOfSysEx = 0xf7; | 16 const uint8_t kEndOfSysEx = 0xf7; |
18 | 17 |
19 bool IsDataByte(uint8_t data) { | 18 bool IsDataByte(uint8_t data) { |
20 return (data & 0x80) == 0; | 19 return (data & 0x80) == 0; |
21 } | 20 } |
22 | 21 |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 continue; | 116 continue; |
118 } | 117 } |
119 | 118 |
120 // OK to consume this byte. | 119 // OK to consume this byte. |
121 next_message_.push_back(next); | 120 next_message_.push_back(next); |
122 queue_.pop_front(); | 121 queue_.pop_front(); |
123 } | 122 } |
124 } | 123 } |
125 | 124 |
126 } // namespace midi | 125 } // namespace midi |
127 } // namespace media | |
OLD | NEW |