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

Unified Diff: media/base/fake_audio_render_callback.cc

Issue 1070923002: Fix incorrect AudioConverter setup for discrete channel layouts. (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/base/fake_audio_render_callback.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/fake_audio_render_callback.cc
diff --git a/media/base/fake_audio_render_callback.cc b/media/base/fake_audio_render_callback.cc
index 5a0979e9ea0203ff316dc53545ef6a0d6d32d09c..73d606ec3fb66f06f40e1584bc40c7a367ed1626 100644
--- a/media/base/fake_audio_render_callback.cc
+++ b/media/base/fake_audio_render_callback.cc
@@ -15,6 +15,7 @@ FakeAudioRenderCallback::FakeAudioRenderCallback(double step)
: half_fill_(false),
step_(step),
last_audio_delay_milliseconds_(-1),
+ last_channel_count_(-1),
volume_(1) {
reset();
}
@@ -24,6 +25,8 @@ FakeAudioRenderCallback::~FakeAudioRenderCallback() {}
int FakeAudioRenderCallback::Render(AudioBus* audio_bus,
int audio_delay_milliseconds) {
last_audio_delay_milliseconds_ = audio_delay_milliseconds;
+ last_channel_count_ = audio_bus->channels();
+
int number_of_frames = audio_bus->frames();
if (half_fill_)
number_of_frames /= 2;
« no previous file with comments | « media/base/fake_audio_render_callback.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698