From 06def69114b5ecae4f0ee0aa875181568fe7902c Mon Sep 17 00:00:00 2001 From: dalecurtis Date: Wed, 25 Mar 2015 18:33:32 -0700 Subject: [PATCH] Use the worker task runner instead of the main audio thread. On OSX the main audio thread is the UI thread due to limitations in the CoreAudio API. Since we're making effectively read only calls sending the audio hardware config from the worker task runner should be fine. We already do this in several other places for device enumeration (since it's way to slow on UI thread). BUG=469737 TEST=none Review URL: https://codereview.chromium.org/1029933003 Cr-Commit-Position: refs/heads/master@{#322292} --- content/browser/renderer_host/render_process_host_impl.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc index e29800cbcee6..3a2e524567c2 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -213,7 +213,7 @@ void RemoveShaderInfo(int32 id) { scoped_ptr SendAudioHardwareConfig() { media::AudioManager* am = media::AudioManager::Get(); - DCHECK(am->GetTaskRunner()->BelongsToCurrentThread()); + DCHECK(am->GetWorkerTaskRunner()->BelongsToCurrentThread()); return make_scoped_ptr(new ViewMsg_SetAudioHardwareConfig( am->GetDefaultOutputStreamParameters(), am->GetInputStreamParameters(media::AudioManagerBase::kDefaultDeviceId))); @@ -2338,7 +2338,7 @@ void RenderProcessHostImpl::OnProcessLaunched() { } base::PostTaskAndReplyWithResult( - media::AudioManager::Get()->GetTaskRunner().get(), FROM_HERE, + media::AudioManager::Get()->GetWorkerTaskRunner().get(), FROM_HERE, base::Bind(&SendAudioHardwareConfig), base::Bind(base::IgnoreResult(&RenderProcessHostImpl::SendHelper), weak_factory_.GetWeakPtr())); -- 2.11.4.GIT