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

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

Issue 1542013004: Switch to standard integer types in media/, take 2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more stddef Created 4 years, 12 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/usb_midi_output_stream.h ('k') | media/midi/usb_midi_output_stream_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 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 #include "media/midi/usb_midi_output_stream.h" 5 #include "media/midi/usb_midi_output_stream.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/macros.h"
8 #include "media/midi/midi_message_util.h" 9 #include "media/midi/midi_message_util.h"
9 #include "media/midi/usb_midi_device.h" 10 #include "media/midi/usb_midi_device.h"
10 11
11 namespace media { 12 namespace media {
12 namespace midi { 13 namespace midi {
13 14
14 UsbMidiOutputStream::UsbMidiOutputStream(const UsbMidiJack& jack) 15 UsbMidiOutputStream::UsbMidiOutputStream(const UsbMidiJack& jack)
15 : jack_(jack), pending_size_(0), is_sending_sysex_(false) {} 16 : jack_(jack), pending_size_(0), is_sending_sysex_(false) {}
16 17
17 void UsbMidiOutputStream::Send(const std::vector<uint8_t>& data) { 18 void UsbMidiOutputStream::Send(const std::vector<uint8_t>& data) {
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 189
189 data_to_send->push_back((jack_.cable_number << 4) | code_index); 190 data_to_send->push_back((jack_.cable_number << 4) | code_index);
190 for (size_t i = index; i < index + 3; ++i) 191 for (size_t i = index; i < index + 3; ++i)
191 data_to_send->push_back(i < index + message_size ? Get(data, i) : 0); 192 data_to_send->push_back(i < index + message_size ? Get(data, i) : 0);
192 *current += message_size; 193 *current += message_size;
193 return true; 194 return true;
194 } 195 }
195 196
196 } // namespace midi 197 } // namespace midi
197 } // namespace media 198 } // namespace media
OLDNEW
« no previous file with comments | « media/midi/usb_midi_output_stream.h ('k') | media/midi/usb_midi_output_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698