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

Side by Side Diff: media/audio/win/audio_low_latency_output_win.h

Issue 23523023: Add GetOutputStreamParameters, GetAssociatedOutputDeviceID to AudioManager. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 3 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 (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 // Implementation of AudioOutputStream for Windows using Windows Core Audio 5 // Implementation of AudioOutputStream for Windows using Windows Core Audio
6 // WASAPI for low latency rendering. 6 // WASAPI for low latency rendering.
7 // 7 //
8 // Overview of operation and performance: 8 // Overview of operation and performance:
9 // 9 //
10 // - An object of WASAPIAudioOutputStream is created by the AudioManager 10 // - An object of WASAPIAudioOutputStream is created by the AudioManager
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 static int HardwareChannelCount(); 142 static int HardwareChannelCount();
143 143
144 // Retrieves the channel layout the audio engine uses for its internal 144 // Retrieves the channel layout the audio engine uses for its internal
145 // processing/mixing of shared-mode streams for the default endpoint device. 145 // processing/mixing of shared-mode streams for the default endpoint device.
146 // Note that we convert an internal channel layout mask (see ChannelMask()) 146 // Note that we convert an internal channel layout mask (see ChannelMask())
147 // into a Chrome-specific channel layout enumerator in this method, hence 147 // into a Chrome-specific channel layout enumerator in this method, hence
148 // the match might not be perfect. 148 // the match might not be perfect.
149 static ChannelLayout HardwareChannelLayout(); 149 static ChannelLayout HardwareChannelLayout();
150 150
151 // Retrieves the sample rate the audio engine uses for its internal 151 // Retrieves the sample rate the audio engine uses for its internal
152 // processing/mixing of shared-mode streams for the default endpoint device. 152 // processing/mixing of shared-mode streams for the default endpoint device.
henrika (OOO until Aug 14) 2013/09/04 11:11:40 Change comment since it states "default".
tommi (sloooow) - chröme 2013/09/04 13:06:55 Done.
153 static int HardwareSampleRate(); 153 static int HardwareSampleRate(const std::string& device_id);
154 154
155 // Returns AUDCLNT_SHAREMODE_EXCLUSIVE if --enable-exclusive-mode is used 155 // Returns AUDCLNT_SHAREMODE_EXCLUSIVE if --enable-exclusive-mode is used
156 // as command-line flag and AUDCLNT_SHAREMODE_SHARED otherwise (default). 156 // as command-line flag and AUDCLNT_SHAREMODE_SHARED otherwise (default).
157 static AUDCLNT_SHAREMODE GetShareMode(); 157 static AUDCLNT_SHAREMODE GetShareMode();
158 158
159 bool started() const { return render_thread_.get() != NULL; } 159 bool started() const { return render_thread_.get() != NULL; }
160 160
161 private: 161 private:
162 // DelegateSimpleThread::Delegate implementation. 162 // DelegateSimpleThread::Delegate implementation.
163 virtual void Run() OVERRIDE; 163 virtual void Run() OVERRIDE;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 253
254 // Container for retrieving data from AudioSourceCallback::OnMoreData(). 254 // Container for retrieving data from AudioSourceCallback::OnMoreData().
255 scoped_ptr<AudioBus> audio_bus_; 255 scoped_ptr<AudioBus> audio_bus_;
256 256
257 DISALLOW_COPY_AND_ASSIGN(WASAPIAudioOutputStream); 257 DISALLOW_COPY_AND_ASSIGN(WASAPIAudioOutputStream);
258 }; 258 };
259 259
260 } // namespace media 260 } // namespace media
261 261
262 #endif // MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_OUTPUT_WIN_H_ 262 #endif // MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_OUTPUT_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698