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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 // is defined as the block of data which the user received in each | 140 // is defined as the block of data which the user received in each |
141 // OnData() callback. | 141 // OnData() callback. |
142 size_t packet_size_frames_; | 142 size_t packet_size_frames_; |
143 | 143 |
144 // Size in bytes of each audio packet. | 144 // Size in bytes of each audio packet. |
145 size_t packet_size_bytes_; | 145 size_t packet_size_bytes_; |
146 | 146 |
147 // Length of the audio endpoint buffer. | 147 // Length of the audio endpoint buffer. |
148 uint32 endpoint_buffer_size_frames_; | 148 uint32 endpoint_buffer_size_frames_; |
149 | 149 |
150 // A copy of the supplied AudioParameter's |effects|. If ducking was | |
151 // specified (desired device=communications) but we ended up not being | |
152 // able to open the communications device, this flag will be cleared. | |
153 int effects_; | |
154 | |
155 // Contains the unique name of the selected endpoint device. | 150 // Contains the unique name of the selected endpoint device. |
156 // Note that AudioManagerBase::kDefaultDeviceId represents the default | 151 // Note that AudioManagerBase::kDefaultDeviceId represents the default |
157 // device role and is not a valid ID as such. | 152 // device role and is not a valid ID as such. |
158 std::string device_id_; | 153 std::string device_id_; |
159 | 154 |
160 // Conversion factor used in delay-estimation calculations. | 155 // Conversion factor used in delay-estimation calculations. |
161 // Converts a raw performance counter value to 100-nanosecond unit. | 156 // Converts a raw performance counter value to 100-nanosecond unit. |
162 double perf_count_to_100ns_units_; | 157 double perf_count_to_100ns_units_; |
163 | 158 |
164 // Conversion factor used in delay-estimation calculations. | 159 // Conversion factor used in delay-estimation calculations. |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 // Extra audio bus used for storage of deinterleaved data for the OnData | 202 // Extra audio bus used for storage of deinterleaved data for the OnData |
208 // callback. | 203 // callback. |
209 scoped_ptr<media::AudioBus> audio_bus_; | 204 scoped_ptr<media::AudioBus> audio_bus_; |
210 | 205 |
211 DISALLOW_COPY_AND_ASSIGN(WASAPIAudioInputStream); | 206 DISALLOW_COPY_AND_ASSIGN(WASAPIAudioInputStream); |
212 }; | 207 }; |
213 | 208 |
214 } // namespace media | 209 } // namespace media |
215 | 210 |
216 #endif // MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_INPUT_WIN_H_ | 211 #endif // MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_INPUT_WIN_H_ |
OLD | NEW |