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

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

Issue 9655018: Make AudioParameters a class instead of a struct (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix copyright years Created 8 years, 9 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) 2011 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
11 // factory. 11 // factory.
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 // Implementation of AudioOutputStream. 154 // Implementation of AudioOutputStream.
155 virtual bool Open() OVERRIDE; 155 virtual bool Open() OVERRIDE;
156 virtual void Start(AudioSourceCallback* callback) OVERRIDE; 156 virtual void Start(AudioSourceCallback* callback) OVERRIDE;
157 virtual void Stop() OVERRIDE; 157 virtual void Stop() OVERRIDE;
158 virtual void Close() OVERRIDE; 158 virtual void Close() OVERRIDE;
159 virtual void SetVolume(double volume) OVERRIDE; 159 virtual void SetVolume(double volume) OVERRIDE;
160 virtual void GetVolume(double* volume) OVERRIDE; 160 virtual void GetVolume(double* volume) OVERRIDE;
161 161
162 // Retrieves the stream format that the audio engine uses for its internal 162 // Retrieves the stream format that the audio engine uses for its internal
163 // processing/mixing of shared-mode streams. 163 // processing/mixing of shared-mode streams.
164 static double HardwareSampleRate(ERole device_role); 164 static int HardwareSampleRate(ERole device_role);
165 165
166 bool started() const { return started_; } 166 bool started() const { return started_; }
167 167
168 private: 168 private:
169 // Implementation of IUnknown (trivial in this case). See 169 // Implementation of IUnknown (trivial in this case). See
170 // msdn.microsoft.com/en-us/library/windows/desktop/dd371403(v=vs.85).aspx 170 // msdn.microsoft.com/en-us/library/windows/desktop/dd371403(v=vs.85).aspx
171 // for details regarding why proper implementations of AddRef(), Release() 171 // for details regarding why proper implementations of AddRef(), Release()
172 // and QueryInterface() are not needed here. 172 // and QueryInterface() are not needed here.
173 STDMETHOD_(ULONG, AddRef)(); 173 STDMETHOD_(ULONG, AddRef)();
174 STDMETHOD_(ULONG, Release)(); 174 STDMETHOD_(ULONG, Release)();
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 // This event will be signaled when rendering shall stop. 301 // This event will be signaled when rendering shall stop.
302 base::win::ScopedHandle stop_render_event_; 302 base::win::ScopedHandle stop_render_event_;
303 303
304 // This event will be signaled when stream switching shall take place. 304 // This event will be signaled when stream switching shall take place.
305 base::win::ScopedHandle stream_switch_event_; 305 base::win::ScopedHandle stream_switch_event_;
306 306
307 DISALLOW_COPY_AND_ASSIGN(WASAPIAudioOutputStream); 307 DISALLOW_COPY_AND_ASSIGN(WASAPIAudioOutputStream);
308 }; 308 };
309 309
310 #endif // MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_OUTPUT_WIN_H_ 310 #endif // MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_OUTPUT_WIN_H_
OLDNEW
« no previous file with comments | « media/audio/win/audio_low_latency_input_win.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