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

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: Address comments 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
« no previous file with comments | « media/audio/mock_audio_manager.cc ('k') | media/audio/win/audio_low_latency_output_win.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 (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. To fetch the settings for the
153 static int HardwareSampleRate(); 153 // default device, pass an empty string as the |device_id|.
154 static int HardwareSampleRate(const std::string& device_id);
154 155
155 // Returns AUDCLNT_SHAREMODE_EXCLUSIVE if --enable-exclusive-mode is used 156 // Returns AUDCLNT_SHAREMODE_EXCLUSIVE if --enable-exclusive-mode is used
156 // as command-line flag and AUDCLNT_SHAREMODE_SHARED otherwise (default). 157 // as command-line flag and AUDCLNT_SHAREMODE_SHARED otherwise (default).
157 static AUDCLNT_SHAREMODE GetShareMode(); 158 static AUDCLNT_SHAREMODE GetShareMode();
158 159
159 bool started() const { return render_thread_.get() != NULL; } 160 bool started() const { return render_thread_.get() != NULL; }
160 161
161 private: 162 private:
162 // DelegateSimpleThread::Delegate implementation. 163 // DelegateSimpleThread::Delegate implementation.
163 virtual void Run() OVERRIDE; 164 virtual void Run() OVERRIDE;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 254
254 // Container for retrieving data from AudioSourceCallback::OnMoreData(). 255 // Container for retrieving data from AudioSourceCallback::OnMoreData().
255 scoped_ptr<AudioBus> audio_bus_; 256 scoped_ptr<AudioBus> audio_bus_;
256 257
257 DISALLOW_COPY_AND_ASSIGN(WASAPIAudioOutputStream); 258 DISALLOW_COPY_AND_ASSIGN(WASAPIAudioOutputStream);
258 }; 259 };
259 260
260 } // namespace media 261 } // namespace media
261 262
262 #endif // MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_OUTPUT_WIN_H_ 263 #endif // MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_OUTPUT_WIN_H_
OLDNEW
« no previous file with comments | « media/audio/mock_audio_manager.cc ('k') | media/audio/win/audio_low_latency_output_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698