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

Side by Side Diff: content/renderer/pepper/pepper_platform_audio_input_impl.cc

Issue 12662038: Revert 187936 "Pass more detailed audio hardware configuration i..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1440/src/
Patch Set: Created 7 years, 9 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 | « content/renderer/media/webrtc_audio_renderer.cc ('k') | content/renderer/render_thread_impl.cc » ('j') | 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/pepper/pepper_platform_audio_input_impl.h" 5 #include "content/renderer/pepper/pepper_platform_audio_input_impl.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/message_loop_proxy.h" 9 #include "base/message_loop_proxy.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 DCHECK(main_message_loop_proxy_->BelongsToCurrentThread()); 158 DCHECK(main_message_loop_proxy_->BelongsToCurrentThread());
159 159
160 if (!plugin_delegate || !client) 160 if (!plugin_delegate || !client)
161 return false; 161 return false;
162 162
163 plugin_delegate_ = plugin_delegate; 163 plugin_delegate_ = plugin_delegate;
164 render_view_id_ = plugin_delegate_->GetRoutingID(); 164 render_view_id_ = plugin_delegate_->GetRoutingID();
165 client_ = client; 165 client_ = client;
166 166
167 params_.Reset(media::AudioParameters::AUDIO_PCM_LINEAR, 167 params_.Reset(media::AudioParameters::AUDIO_PCM_LINEAR,
168 media::CHANNEL_LAYOUT_MONO, 1, 0, 168 media::CHANNEL_LAYOUT_MONO, 0,
169 sample_rate, 16, frames_per_buffer); 169 sample_rate, 16, frames_per_buffer);
170 170
171 if (device_id.empty()) { 171 if (device_id.empty()) {
172 // Use the default device. 172 // Use the default device.
173 ChildProcess::current()->io_message_loop()->PostTask( 173 ChildProcess::current()->io_message_loop()->PostTask(
174 FROM_HERE, 174 FROM_HERE,
175 base::Bind(&PepperPlatformAudioInputImpl::InitializeOnIOThread, 175 base::Bind(&PepperPlatformAudioInputImpl::InitializeOnIOThread,
176 this, 0)); 176 this, 0));
177 } else { 177 } else {
178 // We need to open the device and obtain the label and session ID before 178 // We need to open the device and obtain the label and session ID before
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 } 283 }
284 284
285 void PepperPlatformAudioInputImpl::NotifyStreamCreationFailed() { 285 void PepperPlatformAudioInputImpl::NotifyStreamCreationFailed() {
286 DCHECK(main_message_loop_proxy_->BelongsToCurrentThread()); 286 DCHECK(main_message_loop_proxy_->BelongsToCurrentThread());
287 287
288 if (client_) 288 if (client_)
289 client_->StreamCreationFailed(); 289 client_->StreamCreationFailed();
290 } 290 }
291 291
292 } // namespace content 292 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/webrtc_audio_renderer.cc ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698