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

Side by Side Diff: media/audio/audio_manager.h

Issue 15979015: Reland 15721002: Hook up the device selection to the WebAudio live audio (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed the comments. Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_AUDIO_MANAGER_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_MANAGER_H_
6 #define MEDIA_AUDIO_AUDIO_MANAGER_H_ 6 #define MEDIA_AUDIO_AUDIO_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // we have reached some other platform specific limit. 75 // we have reached some other platform specific limit.
76 // 76 //
77 // |params.format| can be set to AUDIO_PCM_LOW_LATENCY and that has two 77 // |params.format| can be set to AUDIO_PCM_LOW_LATENCY and that has two
78 // effects: 78 // effects:
79 // 1- Instead of triple buffered the audio will be double buffered. 79 // 1- Instead of triple buffered the audio will be double buffered.
80 // 2- A low latency driver or alternative audio subsystem will be used when 80 // 2- A low latency driver or alternative audio subsystem will be used when
81 // available. 81 // available.
82 // 82 //
83 // Do not free the returned AudioOutputStream. It is owned by AudioManager. 83 // Do not free the returned AudioOutputStream. It is owned by AudioManager.
84 virtual AudioOutputStream* MakeAudioOutputStream( 84 virtual AudioOutputStream* MakeAudioOutputStream(
85 const AudioParameters& params) = 0; 85 const AudioParameters& params, const std::string& input_device_id) = 0;
86 86
87 // Creates new audio output proxy. A proxy implements 87 // Creates new audio output proxy. A proxy implements
88 // AudioOutputStream interface, but unlike regular output stream 88 // AudioOutputStream interface, but unlike regular output stream
89 // created with MakeAudioOutputStream() it opens device only when a 89 // created with MakeAudioOutputStream() it opens device only when a
90 // sound is actually playing. 90 // sound is actually playing.
91 virtual AudioOutputStream* MakeAudioOutputStreamProxy( 91 virtual AudioOutputStream* MakeAudioOutputStreamProxy(
92 const AudioParameters& params) = 0; 92 const AudioParameters& params, const std::string& input_device_id) = 0;
93 93
94 // Factory to create audio recording streams. 94 // Factory to create audio recording streams.
95 // |channels| can be 1 or 2. 95 // |channels| can be 1 or 2.
96 // |sample_rate| is in hertz and can be any value supported by the platform. 96 // |sample_rate| is in hertz and can be any value supported by the platform.
97 // |bits_per_sample| can be any value supported by the platform. 97 // |bits_per_sample| can be any value supported by the platform.
98 // |samples_per_packet| is in hertz as well and can be 0 to |sample_rate|, 98 // |samples_per_packet| is in hertz as well and can be 0 to |sample_rate|,
99 // with 0 suggesting that the implementation use a default value for that 99 // with 0 suggesting that the implementation use a default value for that
100 // platform. 100 // platform.
101 // Returns NULL if the combination of the parameters is not supported, or if 101 // Returns NULL if the combination of the parameters is not supported, or if
102 // we have reached some other platform specific limit. 102 // we have reached some other platform specific limit.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 protected: 139 protected:
140 AudioManager(); 140 AudioManager();
141 141
142 private: 142 private:
143 DISALLOW_COPY_AND_ASSIGN(AudioManager); 143 DISALLOW_COPY_AND_ASSIGN(AudioManager);
144 }; 144 };
145 145
146 } // namespace media 146 } // namespace media
147 147
148 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ 148 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698