Remove no longer needed toolbar layer method.
[chromium-blink-merge.git] / media / midi / midi_message_util.cc
blob9e913d70c068627d4a3ffcb4c17395403933411b
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
3 // found in the LICENSE file.
5 #include "media/midi/midi_message_util.h"
7 namespace media {
9 size_t GetMidiMessageLength(uint8 status_byte) {
10 if (status_byte < 0x80)
11 return 0;
12 if (0x80 <= status_byte && status_byte <= 0xbf)
13 return 3;
14 if (0xc0 <= status_byte && status_byte <= 0xdf)
15 return 2;
16 if (0xe0 <= status_byte && status_byte <= 0xef)
17 return 3;
18 if (status_byte == 0xf0)
19 return 0;
20 if (status_byte == 0xf1)
21 return 2;
22 if (status_byte == 0xf2)
23 return 3;
24 if (status_byte == 0xf3)
25 return 2;
26 if (0xf4 <= status_byte && status_byte <= 0xf6)
27 return 1;
28 if (status_byte == 0xf7)
29 return 0;
30 // 0xf8 <= status_byte && status_byte <= 0xff
31 return 1;
34 } // namespace media