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 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
682 | 682 |
683 std::unique_ptr<MidiManagerAlsa::TemporaryMidiPortState> | 683 std::unique_ptr<MidiManagerAlsa::TemporaryMidiPortState> |
684 MidiManagerAlsa::AlsaSeqState::ToMidiPortState(const AlsaCardMap& alsa_cards) { | 684 MidiManagerAlsa::AlsaSeqState::ToMidiPortState(const AlsaCardMap& alsa_cards) { |
685 std::unique_ptr<MidiManagerAlsa::TemporaryMidiPortState> midi_ports( | 685 std::unique_ptr<MidiManagerAlsa::TemporaryMidiPortState> midi_ports( |
686 new TemporaryMidiPortState); | 686 new TemporaryMidiPortState); |
687 auto card_it = alsa_cards.begin(); | 687 auto card_it = alsa_cards.begin(); |
688 | 688 |
689 int card_midi_device = -1; | 689 int card_midi_device = -1; |
690 for (const auto& client_pair : clients_) { | 690 for (const auto& client_pair : clients_) { |
691 int client_id = client_pair.first; | 691 int client_id = client_pair.first; |
692 const auto& client = client_pair.second.get(); | 692 auto* client = client_pair.second.get(); |
693 | 693 |
694 // Get client metadata. | 694 // Get client metadata. |
695 const std::string client_name = client->name(); | 695 const std::string client_name = client->name(); |
696 std::string manufacturer; | 696 std::string manufacturer; |
697 std::string driver; | 697 std::string driver; |
698 std::string path; | 698 std::string path; |
699 MidiPort::Id id; | 699 MidiPort::Id id; |
700 std::string card_name; | 700 std::string card_name; |
701 std::string card_longname; | 701 std::string card_longname; |
702 int midi_device = -1; | 702 int midi_device = -1; |
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1394 source_map_[AddrToInt(client_id, port_id)] = port_index; | 1394 source_map_[AddrToInt(client_id, port_id)] = port_index; |
1395 return true; | 1395 return true; |
1396 } | 1396 } |
1397 | 1397 |
1398 MidiManager* MidiManager::Create() { | 1398 MidiManager* MidiManager::Create() { |
1399 return new MidiManagerAlsa(); | 1399 return new MidiManagerAlsa(); |
1400 } | 1400 } |
1401 | 1401 |
1402 } // namespace midi | 1402 } // namespace midi |
1403 } // namespace media | 1403 } // namespace media |
OLD | NEW |