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

Unified Diff: content/browser/renderer_host/media/audio_sync_reader.cc

Issue 11568021: Merge 169553 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1312/src/
Patch Set: Created 8 years 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 | « content/browser/renderer_host/media/audio_sync_reader.h ('k') | media/audio/audio_io.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/media/audio_sync_reader.cc
===================================================================
--- content/browser/renderer_host/media/audio_sync_reader.cc (revision 172971)
+++ content/browser/renderer_host/media/audio_sync_reader.cc (working copy)
@@ -8,15 +8,10 @@
#include "base/process_util.h"
#include "base/shared_memory.h"
-#include "base/threading/platform_thread.h"
#include "media/audio/audio_buffers_state.h"
#include "media/audio/audio_parameters.h"
#include "media/audio/shared_memory_util.h"
-#if defined(OS_WIN)
-const int kMinIntervalBetweenReadCallsInMs = 10;
-#endif
-
using media::AudioBus;
namespace content {
@@ -62,22 +57,6 @@
}
int AudioSyncReader::Read(AudioBus* source, AudioBus* dest) {
-#if defined(OS_WIN)
- // HACK: yield if reader is called too often.
- // Problem is lack of synchronization between host and renderer. We cannot be
- // sure if renderer already filled the buffer, and due to all the plugins we
- // cannot change the API, so we yield if previous call was too recent.
- // Optimization: if renderer is "new" one that writes length of data we can
- // stop yielding the moment length is written -- not ideal solution,
- // but better than nothing.
- while (!DataReady() &&
- ((base::Time::Now() - previous_call_time_).InMilliseconds() <
- kMinIntervalBetweenReadCallsInMs)) {
- base::PlatformThread::YieldCurrentThread();
- }
- previous_call_time_ = base::Time::Now();
-#endif
-
// Copy optional synchronized live audio input for consumption by renderer
// process.
if (source && input_bus_.get()) {
« no previous file with comments | « content/browser/renderer_host/media/audio_sync_reader.h ('k') | media/audio/audio_io.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698