| OLD | NEW |
| 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/midi_manager_alsa.h" | 5 #include "media/midi/midi_manager_alsa.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 #include <poll.h> | 8 #include <poll.h> |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 #include <stdlib.h> | 10 #include <stdlib.h> |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "base/message_loop/message_loop.h" | 21 #include "base/message_loop/message_loop.h" |
| 22 #include "base/posix/eintr_wrapper.h" | 22 #include "base/posix/eintr_wrapper.h" |
| 23 #include "base/posix/safe_strerror.h" | 23 #include "base/posix/safe_strerror.h" |
| 24 #include "base/single_thread_task_runner.h" | 24 #include "base/single_thread_task_runner.h" |
| 25 #include "base/strings/string_number_conversions.h" | 25 #include "base/strings/string_number_conversions.h" |
| 26 #include "base/strings/stringprintf.h" | 26 #include "base/strings/stringprintf.h" |
| 27 #include "base/time/time.h" | 27 #include "base/time/time.h" |
| 28 #include "crypto/sha2.h" | 28 #include "crypto/sha2.h" |
| 29 #include "media/midi/midi_port_info.h" | 29 #include "media/midi/midi_port_info.h" |
| 30 | 30 |
| 31 namespace media { | |
| 32 namespace midi { | 31 namespace midi { |
| 33 | 32 |
| 34 namespace { | 33 namespace { |
| 35 | 34 |
| 36 // Per-output buffer. This can be smaller, but then large sysex messages | 35 // Per-output buffer. This can be smaller, but then large sysex messages |
| 37 // will be (harmlessly) split across multiple seq events. This should | 36 // will be (harmlessly) split across multiple seq events. This should |
| 38 // not have any real practical effect, except perhaps to slightly reorder | 37 // not have any real practical effect, except perhaps to slightly reorder |
| 39 // realtime messages with respect to sysex. | 38 // realtime messages with respect to sysex. |
| 40 const size_t kSendBufferSize = 256; | 39 const size_t kSendBufferSize = 256; |
| 41 | 40 |
| (...skipping 1355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1397 // Update our map. | 1396 // Update our map. |
| 1398 source_map_[AddrToInt(client_id, port_id)] = port_index; | 1397 source_map_[AddrToInt(client_id, port_id)] = port_index; |
| 1399 return true; | 1398 return true; |
| 1400 } | 1399 } |
| 1401 | 1400 |
| 1402 MidiManager* MidiManager::Create() { | 1401 MidiManager* MidiManager::Create() { |
| 1403 return new MidiManagerAlsa(); | 1402 return new MidiManagerAlsa(); |
| 1404 } | 1403 } |
| 1405 | 1404 |
| 1406 } // namespace midi | 1405 } // namespace midi |
| 1407 } // namespace media | |
| OLD | NEW |