Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: media/midi/midi_message_util.cc

Issue 2418493002: //media/midi: use top level namespace midi rather than media.midi (Closed)
Patch Set: TAG name change s/media_midi/midi/ Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/midi/midi_message_util.h ('k') | media/midi/midi_message_util_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/logging.h" 5 #include "base/logging.h"
6 #include "media/midi/midi_message_util.h" 6 #include "media/midi/midi_message_util.h"
7 7
8 namespace media {
9 namespace midi { 8 namespace midi {
10 9
11 size_t GetMidiMessageLength(uint8_t status_byte) { 10 size_t GetMidiMessageLength(uint8_t status_byte) {
12 if (status_byte < 0x80) 11 if (status_byte < 0x80)
13 return 0; 12 return 0;
14 if (0x80 <= status_byte && status_byte <= 0xbf) 13 if (0x80 <= status_byte && status_byte <= 0xbf)
15 return 3; 14 return 3;
16 if (0xc0 <= status_byte && status_byte <= 0xdf) 15 if (0xc0 <= status_byte && status_byte <= 0xdf)
17 return 2; 16 return 2;
18 if (0xe0 <= status_byte && status_byte <= 0xef) 17 if (0xe0 <= status_byte && status_byte <= 0xef)
(...skipping 24 matching lines...) Expand all
43 case 0xfe: 42 case 0xfe:
44 case 0xff: 43 case 0xff:
45 return 1; 44 return 1;
46 default: 45 default:
47 NOTREACHED(); 46 NOTREACHED();
48 return 0; 47 return 0;
49 } 48 }
50 } 49 }
51 50
52 } // namespace midi 51 } // namespace midi
53 } // namespace media
OLDNEW
« no previous file with comments | « media/midi/midi_message_util.h ('k') | media/midi/midi_message_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698