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

Unified Diff: services/media/audio/platform/generic/mixer.cc

Issue 1471813002: Mix to an intermediate buffer. (Closed) Base URL: https://github.com/domokit/mojo.git@change7
Patch Set: Final rebase before landing Created 4 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
Index: services/media/audio/platform/generic/mixer.cc
diff --git a/services/media/audio/platform/generic/mixer.cc b/services/media/audio/platform/generic/mixer.cc
index eb1929135333d0bb12cd8c39cd2bc7125abeba2c..622e2ee9aafebe58d5c71c385e7c26f8772c435f 100644
--- a/services/media/audio/platform/generic/mixer.cc
+++ b/services/media/audio/platform/generic/mixer.cc
@@ -25,13 +25,16 @@ Mixer::Mixer(uint32_t pos_filter_width,
}
MixerPtr Mixer::Select(const LpcmMediaTypeDetailsPtr& src_format,
- const LpcmMediaTypeDetailsPtr& dst_format) {
+ const LpcmMediaTypeDetailsPtr* optional_dst_format) {
// We should always have a source format.
DCHECK(src_format);
// If we don't have a destination format, just stick with no-op. This is
// probably the ThrottleOutput we are picking a mixer for.
- if (!dst_format) { return MixerPtr(new mixers::NoOp()); }
+ if (!optional_dst_format) { return MixerPtr(new mixers::NoOp()); }
+
+ const LpcmMediaTypeDetailsPtr& dst_format = *optional_dst_format;
+ DCHECK(dst_format);
// If the source sample rate is an integer multiple of the destination sample
// rate, just use the point sampler. Otherwise, use the linear re-sampler.
« no previous file with comments | « services/media/audio/platform/generic/mixer.h ('k') | services/media/audio/platform/generic/mixers/linear_sampler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698