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

Side by Side Diff: remoting/host/audio_capturer_win.cc

Issue 2934983002: [Chromoting] Update comments in AudioCapturerWin (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « no previous file | no next file » | 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 #include "remoting/host/audio_capturer_win.h" 5 #include "remoting/host/audio_capturer_win.h"
6 6
7 #include <avrt.h> 7 #include <avrt.h>
8 #include <mmreg.h> 8 #include <mmreg.h>
9 #include <mmsystem.h> 9 #include <mmsystem.h>
10 #include <objbase.h> 10 #include <objbase.h>
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 break; 267 break;
268 268
269 if (volume_filter_.Apply(reinterpret_cast<int16_t*>(data), frames)) { 269 if (volume_filter_.Apply(reinterpret_cast<int16_t*>(data), frames)) {
270 std::unique_ptr<AudioPacket> packet(new AudioPacket()); 270 std::unique_ptr<AudioPacket> packet(new AudioPacket());
271 packet->add_data(data, frames * wave_format_ex_->nBlockAlign); 271 packet->add_data(data, frames * wave_format_ex_->nBlockAlign);
272 packet->set_encoding(AudioPacket::ENCODING_RAW); 272 packet->set_encoding(AudioPacket::ENCODING_RAW);
273 packet->set_sampling_rate(sampling_rate_); 273 packet->set_sampling_rate(sampling_rate_);
274 packet->set_bytes_per_sample(AudioPacket::BYTES_PER_SAMPLE_2); 274 packet->set_bytes_per_sample(AudioPacket::BYTES_PER_SAMPLE_2);
275 // Only the count of channels is taken into account now, we should also 275 // Only the count of channels is taken into account now, we should also
276 // consider dwChannelMask. 276 // consider dwChannelMask.
277 // TODO(zijiehe): Support also layouts. 277 // TODO(zijiehe): Support various layouts of speakers.
Sergey Ulanov 2017/06/12 23:59:18 This TODO is confusing since technically the curre
Hzj_jie 2017/06/13 01:45:46 Done.
278 packet->set_channels(static_cast<AudioPacket::Channels>( 278 packet->set_channels(static_cast<AudioPacket::Channels>(
279 wave_format_ex_->nChannels)); 279 wave_format_ex_->nChannels));
280 280
281 callback_.Run(std::move(packet)); 281 callback_.Run(std::move(packet));
282 } 282 }
283 283
284 hr = audio_capture_client_->ReleaseBuffer(frames); 284 hr = audio_capture_client_->ReleaseBuffer(frames);
285 if (FAILED(hr)) 285 if (FAILED(hr))
286 break; 286 break;
287 } 287 }
(...skipping 13 matching lines...) Expand all
301 301
302 bool AudioCapturer::IsSupported() { 302 bool AudioCapturer::IsSupported() {
303 return true; 303 return true;
304 } 304 }
305 305
306 std::unique_ptr<AudioCapturer> AudioCapturer::Create() { 306 std::unique_ptr<AudioCapturer> AudioCapturer::Create() {
307 return base::WrapUnique(new AudioCapturerWin()); 307 return base::WrapUnique(new AudioCapturerWin());
308 } 308 }
309 309
310 } // namespace remoting 310 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698