| OLD | NEW |
| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 virtual void Close() OVERRIDE; | 103 virtual void Close() OVERRIDE; |
| 104 virtual double GetMaxVolume() OVERRIDE; | 104 virtual double GetMaxVolume() OVERRIDE; |
| 105 virtual void SetVolume(double volume) OVERRIDE; | 105 virtual void SetVolume(double volume) OVERRIDE; |
| 106 virtual double GetVolume() OVERRIDE; | 106 virtual double GetVolume() OVERRIDE; |
| 107 | 107 |
| 108 // Retrieves the sample rate used by the audio engine for its internal | 108 // Retrieves the sample rate used by the audio engine for its internal |
| 109 // processing/mixing of shared-mode streams given a specifed device. | 109 // processing/mixing of shared-mode streams given a specifed device. |
| 110 static int HardwareSampleRate(const std::string& device_id); | 110 static int HardwareSampleRate(const std::string& device_id); |
| 111 | 111 |
| 112 // Retrieves the number of audio channels used by the audio engine for its | 112 // Retrieves the number of audio channels used by the audio engine for its |
| 113 // internal processing/mixing of shared-mode streams given a specifed device. | 113 // internal processing/mixing of shared-mode streams given a specified device. |
| 114 static uint32 HardwareChannelCount(const std::string& device_id); | 114 static uint32 HardwareChannelCount(const std::string& device_id); |
| 115 | 115 |
| 116 bool started() const { return started_; } | 116 bool started() const { return started_; } |
| 117 | 117 |
| 118 private: | 118 private: |
| 119 // DelegateSimpleThread::Delegate implementation. | 119 // DelegateSimpleThread::Delegate implementation. |
| 120 virtual void Run() OVERRIDE; | 120 virtual void Run() OVERRIDE; |
| 121 | 121 |
| 122 // Issues the OnError() callback to the |sink_|. | 122 // Issues the OnError() callback to the |sink_|. |
| 123 void HandleError(HRESULT err); | 123 void HandleError(HRESULT err); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 | 208 |
| 209 // This event will be signaled when capturing shall stop. | 209 // This event will be signaled when capturing shall stop. |
| 210 base::win::ScopedHandle stop_capture_event_; | 210 base::win::ScopedHandle stop_capture_event_; |
| 211 | 211 |
| 212 DISALLOW_COPY_AND_ASSIGN(WASAPIAudioInputStream); | 212 DISALLOW_COPY_AND_ASSIGN(WASAPIAudioInputStream); |
| 213 }; | 213 }; |
| 214 | 214 |
| 215 } // namespace media | 215 } // namespace media |
| 216 | 216 |
| 217 #endif // MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_INPUT_WIN_H_ | 217 #endif // MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_INPUT_WIN_H_ |
| OLD | NEW |