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

Unified Diff: content/renderer/audio_device.cc

Issue 6949009: Add support for real-time audio threads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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 | « base/threading/simple_thread.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/audio_device.cc
===================================================================
--- content/renderer/audio_device.cc (revision 85324)
+++ content/renderer/audio_device.cc (working copy)
@@ -207,7 +207,6 @@
// Allow the client to pre-populate the buffer.
FireRenderCallback();
- // TODO(crogers): we could optionally set the thread to high-priority
audio_thread_.reset(
new base::DelegateSimpleThread(this, "renderer_audio_thread"));
audio_thread_->Start();
@@ -224,6 +223,8 @@
// Our audio thread runs here.
void AudioDevice::Run() {
+ audio_thread_->SetThreadPriority(base::kThreadPriority_RealtimeAudio);
+
int pending_data;
const int samples_per_ms = static_cast<int>(sample_rate_) / 1000;
const int bytes_per_ms = channels_ * (bits_per_sample_ / 8) * samples_per_ms;
« no previous file with comments | « base/threading/simple_thread.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698