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

Side by Side Diff: media/audio/win/audio_low_latency_input_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
« no previous file with comments | « media/audio/simple_sources_unittest.cc ('k') | media/audio/win/audio_low_latency_input_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 AudioInputStream for Windows using Windows Core Audio 5 // Implementation of AudioInputStream for Windows using Windows Core Audio
6 // WASAPI for low latency capturing. 6 // WASAPI for low latency capturing.
7 // 7 //
8 // Overview of operation: 8 // Overview of operation:
9 // 9 //
10 // - An object of WASAPIAudioInputStream is created by the AudioManager 10 // - An object of WASAPIAudioInputStream is created by the AudioManager
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 virtual bool Open() OVERRIDE; 98 virtual bool Open() OVERRIDE;
99 virtual void Start(AudioInputCallback* callback) OVERRIDE; 99 virtual void Start(AudioInputCallback* callback) OVERRIDE;
100 virtual void Stop() OVERRIDE; 100 virtual void Stop() OVERRIDE;
101 virtual void Close() OVERRIDE; 101 virtual void Close() OVERRIDE;
102 virtual double GetMaxVolume() OVERRIDE; 102 virtual double GetMaxVolume() OVERRIDE;
103 virtual void SetVolume(double volume) OVERRIDE; 103 virtual void SetVolume(double volume) OVERRIDE;
104 virtual double GetVolume() OVERRIDE; 104 virtual double GetVolume() OVERRIDE;
105 105
106 // Retrieves the sample rate used by the audio engine for its internal 106 // Retrieves the sample rate used by the audio engine for its internal
107 // processing/mixing of shared-mode streams given a specifed device. 107 // processing/mixing of shared-mode streams given a specifed device.
108 static double HardwareSampleRate(const std::string& device_id); 108 static int HardwareSampleRate(const std::string& device_id);
109 109
110 // Retrieves the number of audio channels used by the audio engine for its 110 // Retrieves the number of audio channels used by the audio engine for its
111 // internal processing/mixing of shared-mode streams given a specifed device. 111 // internal processing/mixing of shared-mode streams given a specifed device.
112 static uint32 HardwareChannelCount(const std::string& device_id); 112 static uint32 HardwareChannelCount(const std::string& device_id);
113 113
114 bool started() const { return started_; } 114 bool started() const { return started_; }
115 115
116 private: 116 private:
117 // DelegateSimpleThread::Delegate implementation. 117 // DelegateSimpleThread::Delegate implementation.
118 virtual void Run() OVERRIDE; 118 virtual void Run() OVERRIDE;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 // recorded. 204 // recorded.
205 base::win::ScopedHandle audio_samples_ready_event_; 205 base::win::ScopedHandle audio_samples_ready_event_;
206 206
207 // This event will be signaled when capturing shall stop. 207 // This event will be signaled when capturing shall stop.
208 base::win::ScopedHandle stop_capture_event_; 208 base::win::ScopedHandle stop_capture_event_;
209 209
210 DISALLOW_COPY_AND_ASSIGN(WASAPIAudioInputStream); 210 DISALLOW_COPY_AND_ASSIGN(WASAPIAudioInputStream);
211 }; 211 };
212 212
213 #endif // MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_INPUT_WIN_H_ 213 #endif // MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_INPUT_WIN_H_
OLDNEW
« no previous file with comments | « media/audio/simple_sources_unittest.cc ('k') | media/audio/win/audio_low_latency_input_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698