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

Unified Diff: media/audio/audio_output_mixer.cc

Issue 10533004: Use aligned buffer in the audio mixer. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 6 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 | « media/audio/audio_output_mixer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_output_mixer.cc
===================================================================
--- media/audio/audio_output_mixer.cc (revision 140416)
+++ media/audio/audio_output_mixer.cc (working copy)
@@ -20,14 +20,13 @@
const AudioParameters& params,
const base::TimeDelta& close_delay)
: AudioOutputDispatcher(audio_manager, params),
+ mixer_data_(new DecoderBuffer(params_.GetBytesPerBuffer())),
scherkus (not reviewing) 2012/06/05 16:37:43 I'm not convinced we should be using DecoderBuffer
ALLOW_THIS_IN_INITIALIZER_LIST(weak_this_(this)),
close_timer_(FROM_HERE,
close_delay,
weak_this_.GetWeakPtr(),
&AudioOutputMixer::ClosePhysicalStream),
pending_bytes_(0) {
- // TODO(enal): align data.
- mixer_data_.reset(new uint8[params_.GetBytesPerBuffer()]);
}
AudioOutputMixer::~AudioOutputMixer() {
@@ -208,7 +207,7 @@
if (actual_size < max_size)
memset(dest + actual_size, 0, max_size - actual_size);
first_stream = false;
- actual_dest = mixer_data_.get();
+ actual_dest = mixer_data_->GetWritableData();
actual_total_size = actual_size;
} else {
media::MixStreams(dest,
« no previous file with comments | « media/audio/audio_output_mixer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698