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

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

Issue 367923004: Turn audio ducking on by default on Windows again. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 6 years, 5 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
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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 // is defined as the block of data which the user received in each 150 // is defined as the block of data which the user received in each
151 // OnData() callback. 151 // OnData() callback.
152 size_t packet_size_frames_; 152 size_t packet_size_frames_;
153 153
154 // Size in bytes of each audio packet. 154 // Size in bytes of each audio packet.
155 size_t packet_size_bytes_; 155 size_t packet_size_bytes_;
156 156
157 // Length of the audio endpoint buffer. 157 // Length of the audio endpoint buffer.
158 uint32 endpoint_buffer_size_frames_; 158 uint32 endpoint_buffer_size_frames_;
159 159
160 // A copy of the supplied AudioParameter's |effects|. 160 // A copy of the supplied AudioParameter's |effects|. If ducking was
161 const int effects_; 161 // specified (desired device=communications) but we ended up not being
162 // able to open the communications device, this flag will be cleared.
163 int effects_;
162 164
163 // Contains the unique name of the selected endpoint device. 165 // Contains the unique name of the selected endpoint device.
164 // Note that AudioManagerBase::kDefaultDeviceId represents the default 166 // Note that AudioManagerBase::kDefaultDeviceId represents the default
165 // device role and is not a valid ID as such. 167 // device role and is not a valid ID as such.
166 std::string device_id_; 168 std::string device_id_;
167 169
168 // Conversion factor used in delay-estimation calculations. 170 // Conversion factor used in delay-estimation calculations.
169 // Converts a raw performance counter value to 100-nanosecond unit. 171 // Converts a raw performance counter value to 100-nanosecond unit.
170 double perf_count_to_100ns_units_; 172 double perf_count_to_100ns_units_;
171 173
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 // Extra audio bus used for storage of deinterleaved data for the OnData 217 // Extra audio bus used for storage of deinterleaved data for the OnData
216 // callback. 218 // callback.
217 scoped_ptr<media::AudioBus> audio_bus_; 219 scoped_ptr<media::AudioBus> audio_bus_;
218 220
219 DISALLOW_COPY_AND_ASSIGN(WASAPIAudioInputStream); 221 DISALLOW_COPY_AND_ASSIGN(WASAPIAudioInputStream);
220 }; 222 };
221 223
222 } // namespace media 224 } // namespace media
223 225
224 #endif // MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_INPUT_WIN_H_ 226 #endif // MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_INPUT_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698