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

Unified Diff: media/audio/audio_output_resampler.cc

Issue 12155003: Use the correct number of WaveOut buffers on XP... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Useless header. Created 7 years, 11 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 | media/audio/audio_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_output_resampler.cc
diff --git a/media/audio/audio_output_resampler.cc b/media/audio/audio_output_resampler.cc
index 4734e40b801d3f7660213ef02c60186e96367ba9..1fcb474fc8ae5ec971e9169ed374123d6b2e0372 100644
--- a/media/audio/audio_output_resampler.cc
+++ b/media/audio/audio_output_resampler.cc
@@ -21,10 +21,6 @@
#include "media/base/limits.h"
#include "media/base/media_switches.h"
-#if defined(OS_WIN)
-#include "media/audio/win/core_audio_util_win.h"
-#endif
-
namespace media {
class OnMoreDataConverter
@@ -77,10 +73,6 @@ class OnMoreDataConverter
// parameters.
AudioConverter audio_converter_;
- // If we're using WaveOut on Windows' we always have to wait for DataReady()
- // before calling |source_callback_|.
- bool waveout_wait_hack_;
-
DISALLOW_COPY_AND_ASSIGN(OnMoreDataConverter);
};
@@ -287,22 +279,10 @@ OnMoreDataConverter::OnMoreDataConverter(const AudioParameters& input_params,
: source_callback_(NULL),
source_bus_(NULL),
input_bytes_per_second_(input_params.GetBytesPerSecond()),
- audio_converter_(input_params, output_params, false),
- waveout_wait_hack_(false) {
+ audio_converter_(input_params, output_params, false) {
io_ratio_ =
static_cast<double>(input_params.GetBytesPerSecond()) /
output_params.GetBytesPerSecond();
-
- // TODO(dalecurtis): We should require all render side clients to use a
- // buffer size that's a multiple of the hardware buffer size scaled by the
- // request_sample_rate / hw_sample_rate. Doing so ensures each hardware
- // request for audio data results in only a single render side callback and
- // would allow us to remove this hack. See http://crbug.com/162207.
-#if defined(OS_WIN)
- waveout_wait_hack_ =
- output_params.format() == AudioParameters::AUDIO_PCM_LINEAR ||
- !CoreAudioUtil::IsSupported();
-#endif
}
OnMoreDataConverter::~OnMoreDataConverter() {}
@@ -361,9 +341,6 @@ double OnMoreDataConverter::ProvideInput(AudioBus* dest,
io_ratio_ * (current_buffers_state_.total_bytes() +
buffer_delay.InSecondsF() * input_bytes_per_second_);
- if (waveout_wait_hack_)
- source_callback_->WaitTillDataReady();
-
// Retrieve data from the original callback.
int frames = source_callback_->OnMoreIOData(
source_bus_, dest, new_buffers_state);
« no previous file with comments | « no previous file | media/audio/audio_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698