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

Side by Side Diff: content/renderer/media/webrtc_audio_capturer.cc

Issue 315073004: Remove volume level DCHECK in WebRtcAudioCapturer on CrOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« 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 "content/renderer/media/webrtc_audio_capturer.h" 5 #include "content/renderer/media/webrtc_audio_capturer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 450
451 void WebRtcAudioCapturer::Capture(media::AudioBus* audio_source, 451 void WebRtcAudioCapturer::Capture(media::AudioBus* audio_source,
452 int audio_delay_milliseconds, 452 int audio_delay_milliseconds,
453 double volume, 453 double volume,
454 bool key_pressed) { 454 bool key_pressed) {
455 // This callback is driven by AudioInputDevice::AudioThreadCallback if 455 // This callback is driven by AudioInputDevice::AudioThreadCallback if
456 // |source_| is AudioInputDevice, otherwise it is driven by client's 456 // |source_| is AudioInputDevice, otherwise it is driven by client's
457 // CaptureCallback. 457 // CaptureCallback.
458 #if defined(OS_WIN) || defined(OS_MACOSX) 458 #if defined(OS_WIN) || defined(OS_MACOSX)
459 DCHECK_LE(volume, 1.0); 459 DCHECK_LE(volume, 1.0);
460 #elif defined(OS_LINUX) || defined(OS_OPENBSD) 460 #elif (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_OPENBSD)
461 // We have a special situation on Linux where the microphone volume can be 461 // We have a special situation on Linux where the microphone volume can be
462 // "higher than maximum". The input volume slider in the sound preference 462 // "higher than maximum". The input volume slider in the sound preference
463 // allows the user to set a scaling that is higher than 100%. It means that 463 // allows the user to set a scaling that is higher than 100%. It means that
464 // even if the reported maximum levels is N, the actual microphone level can 464 // even if the reported maximum levels is N, the actual microphone level can
465 // go up to 1.5x*N and that corresponds to a normalized |volume| of 1.5x. 465 // go up to 1.5x*N and that corresponds to a normalized |volume| of 1.5x.
466 DCHECK_LE(volume, 1.6); 466 DCHECK_LE(volume, 1.6);
467 #endif 467 #endif
468 468
469 TrackList::ItemList tracks; 469 TrackList::ItemList tracks;
470 TrackList::ItemList tracks_to_notify_format; 470 TrackList::ItemList tracks_to_notify_format;
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 DCHECK(aec_dump_file.IsValid()); 620 DCHECK(aec_dump_file.IsValid());
621 audio_processor_->StartAecDump(aec_dump_file.Pass()); 621 audio_processor_->StartAecDump(aec_dump_file.Pass());
622 } 622 }
623 623
624 void WebRtcAudioCapturer::StopAecDump() { 624 void WebRtcAudioCapturer::StopAecDump() {
625 DCHECK(thread_checker_.CalledOnValidThread()); 625 DCHECK(thread_checker_.CalledOnValidThread());
626 audio_processor_->StopAecDump(); 626 audio_processor_->StopAecDump();
627 } 627 }
628 628
629 } // namespace content 629 } // namespace content
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