| 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 { | 12 namespace media { |
| 13 namespace midi { |
| 13 namespace { | 14 namespace { |
| 14 | 15 |
| 15 const uint8 kSysEx = 0xf0; | 16 const uint8 kSysEx = 0xf0; |
| 16 const uint8 kEndOfSysEx = 0xf7; | 17 const uint8 kEndOfSysEx = 0xf7; |
| 17 | 18 |
| 18 bool IsDataByte(uint8 data) { | 19 bool IsDataByte(uint8 data) { |
| 19 return (data & 0x80) == 0; | 20 return (data & 0x80) == 0; |
| 20 } | 21 } |
| 21 | 22 |
| 22 bool IsFirstStatusByte(uint8 data) { | 23 bool IsFirstStatusByte(uint8 data) { |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 // Note that system common messages should reset the running status. | 115 // Note that system common messages should reset the running status. |
| 115 next_message_.push_back(status_byte); | 116 next_message_.push_back(status_byte); |
| 116 } | 117 } |
| 117 return; | 118 return; |
| 118 } | 119 } |
| 119 | 120 |
| 120 NOTREACHED(); | 121 NOTREACHED(); |
| 121 } | 122 } |
| 122 } | 123 } |
| 123 | 124 |
| 125 } // namespace midi |
| 124 } // namespace media | 126 } // namespace media |
| OLD | NEW |