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

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: Created 3 years, 11 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
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 'Default' |is_input| choice.
tommi (sloooow) - chröme 2017/01/25 22:05:28 nit: // Checks if |device_id| corresponds to the
Qiang(Joe) Xu 2017/01/25 22:50:18 Done.
56 bool IsDefault(const std::string& device_id, bool is_input);
57
55 protected: 58 protected:
56 ~AudioManagerCras() override; 59 ~AudioManagerCras() override;
57 60
58 AudioParameters GetPreferredOutputStreamParameters( 61 AudioParameters GetPreferredOutputStreamParameters(
59 const std::string& output_device_id, 62 const std::string& output_device_id,
60 const AudioParameters& input_params) override; 63 const AudioParameters& input_params) override;
61 64
62 private: 65 private:
63 // Called by MakeLinearOutputStream and MakeLowLatencyOutputStream. 66 // Called by MakeLinearOutputStream and MakeLowLatencyOutputStream.
64 AudioOutputStream* MakeOutputStream(const AudioParameters& params); 67 AudioOutputStream* MakeOutputStream(const AudioParameters& params,
68 const std::string& device_id);
65 69
66 // Called by MakeLinearInputStream and MakeLowLatencyInputStream. 70 // Called by MakeLinearInputStream and MakeLowLatencyInputStream.
67 AudioInputStream* MakeInputStream(const AudioParameters& params, 71 AudioInputStream* MakeInputStream(const AudioParameters& params,
68 const std::string& device_id); 72 const std::string& device_id);
69 73
70 void GetAudioDeviceNamesImpl(bool is_input, AudioDeviceNames* device_names); 74 void GetAudioDeviceNamesImpl(bool is_input, AudioDeviceNames* device_names);
71 75
72 void AddBeamformingDevices(AudioDeviceNames* device_names); 76 void AddBeamformingDevices(AudioDeviceNames* device_names);
73 77
74 // Stores the mic positions field from the device. 78 // Stores the mic positions field from the device.
75 std::vector<Point> mic_positions_; 79 std::vector<Point> mic_positions_;
76 80
77 const char* beamforming_on_device_id_; 81 const char* beamforming_on_device_id_;
78 const char* beamforming_off_device_id_; 82 const char* beamforming_off_device_id_;
79 83
80 DISALLOW_COPY_AND_ASSIGN(AudioManagerCras); 84 DISALLOW_COPY_AND_ASSIGN(AudioManagerCras);
81 }; 85 };
82 86
83 } // namespace media 87 } // namespace media
84 88
85 #endif // MEDIA_AUDIO_CRAS_AUDIO_MANAGER_CRAS_H_ 89 #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') | media/audio/cras/audio_manager_cras.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698