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

Unified Diff: components/audio_modem/audio_recorder_impl.cc

Issue 1207553004: Turning off effects for audio modem recording. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/audio_modem/audio_recorder_impl.cc
diff --git a/components/audio_modem/audio_recorder_impl.cc b/components/audio_modem/audio_recorder_impl.cc
index 634380f9837477260f5d8f315dafdc7884c5281e..e2826887b871368bd61623f7ffe8b621d63b51e8 100644
--- a/components/audio_modem/audio_recorder_impl.cc
+++ b/components/audio_modem/audio_recorder_impl.cc
@@ -96,11 +96,19 @@ void AudioRecorderImpl::Finalize() {
void AudioRecorderImpl::InitializeOnAudioThread() {
DCHECK(media::AudioManager::Get()->GetTaskRunner()->BelongsToCurrentThread());
- media::AudioParameters params =
- params_for_testing_
- ? *params_for_testing_
- : media::AudioManager::Get()->GetInputStreamParameters(
- media::AudioManagerBase::kDefaultDeviceId);
+ media::AudioParameters params;
+ if (params_for_testing_) {
+ params = *params_for_testing_;
+ } else {
+ params = media::AudioManager::Get()->GetInputStreamParameters(
+ media::AudioManagerBase::kDefaultDeviceId);
+ params = media::AudioParameters(params.format(),
+ params.channel_layout(),
+ params.sample_rate(),
+ params.bits_per_sample(),
+ params.frames_per_buffer(),
+ media::AudioParameters::NO_EFFECTS);
+ }
total_buffer_frames_ = kProcessIntervalMs * params.sample_rate() / 1000;
buffer_ = media::AudioBus::Create(params.channels(), total_buffer_frames_);
« 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