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

Side by Side Diff: media/audio/cras/audio_manager_cras.h

Issue 2651073004: ChromeOS: enable pinning stream output routing for webapp request [extracted from 2516813002] (Closed)
Patch Set: comments from ps1 Created 3 years, 10 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 | « no previous file | media/audio/cras/audio_manager_cras.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 #ifndef MEDIA_AUDIO_CRAS_AUDIO_MANAGER_CRAS_H_ 5 #ifndef MEDIA_AUDIO_CRAS_AUDIO_MANAGER_CRAS_H_
6 #define MEDIA_AUDIO_CRAS_AUDIO_MANAGER_CRAS_H_ 6 #define MEDIA_AUDIO_CRAS_AUDIO_MANAGER_CRAS_H_
7 7
8 #include <cras_types.h> 8 #include <cras_types.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 const AudioParameters& params, 45 const AudioParameters& params,
46 const std::string& device_id, 46 const std::string& device_id,
47 const LogCallback& log_callback) override; 47 const LogCallback& log_callback) override;
48 AudioInputStream* MakeLowLatencyInputStream( 48 AudioInputStream* MakeLowLatencyInputStream(
49 const AudioParameters& params, 49 const AudioParameters& params,
50 const std::string& device_id, 50 const std::string& device_id,
51 const LogCallback& log_callback) override; 51 const LogCallback& log_callback) override;
52 52
53 static snd_pcm_format_t BitsToFormat(int bits_per_sample); 53 static snd_pcm_format_t BitsToFormat(int bits_per_sample);
54 54
55 // Checks if |device_id| corresponds to the default device.
56 // Set |is_input| to true for capture devices, false for output.
57 bool IsDefault(const std::string& device_id, bool is_input);
58
55 protected: 59 protected:
56 ~AudioManagerCras() override; 60 ~AudioManagerCras() override;
57 61
58 AudioParameters GetPreferredOutputStreamParameters( 62 AudioParameters GetPreferredOutputStreamParameters(
59 const std::string& output_device_id, 63 const std::string& output_device_id,
60 const AudioParameters& input_params) override; 64 const AudioParameters& input_params) override;
61 65
62 private: 66 private:
63 // Called by MakeLinearOutputStream and MakeLowLatencyOutputStream. 67 // Called by MakeLinearOutputStream and MakeLowLatencyOutputStream.
64 AudioOutputStream* MakeOutputStream(const AudioParameters& params); 68 AudioOutputStream* MakeOutputStream(const AudioParameters& params,
69 const std::string& device_id);
65 70
66 // Called by MakeLinearInputStream and MakeLowLatencyInputStream. 71 // Called by MakeLinearInputStream and MakeLowLatencyInputStream.
67 AudioInputStream* MakeInputStream(const AudioParameters& params, 72 AudioInputStream* MakeInputStream(const AudioParameters& params,
68 const std::string& device_id); 73 const std::string& device_id);
69 74
70 void GetAudioDeviceNamesImpl(bool is_input, AudioDeviceNames* device_names); 75 void GetAudioDeviceNamesImpl(bool is_input, AudioDeviceNames* device_names);
71 76
72 void AddBeamformingDevices(AudioDeviceNames* device_names); 77 void AddBeamformingDevices(AudioDeviceNames* device_names);
73 78
74 // Stores the mic positions field from the device. 79 // Stores the mic positions field from the device.
75 std::vector<Point> mic_positions_; 80 std::vector<Point> mic_positions_;
76 81
77 const char* beamforming_on_device_id_; 82 const char* beamforming_on_device_id_;
78 const char* beamforming_off_device_id_; 83 const char* beamforming_off_device_id_;
79 84
80 DISALLOW_COPY_AND_ASSIGN(AudioManagerCras); 85 DISALLOW_COPY_AND_ASSIGN(AudioManagerCras);
81 }; 86 };
82 87
83 } // namespace media 88 } // namespace media
84 89
85 #endif // MEDIA_AUDIO_CRAS_AUDIO_MANAGER_CRAS_H_ 90 #endif // MEDIA_AUDIO_CRAS_AUDIO_MANAGER_CRAS_H_
OLDNEW
« no previous file with comments | « no previous file | media/audio/cras/audio_manager_cras.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698