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

Side by Side Diff: services/media/audio/platform/generic/mixer.cc

Issue 1424933002: Add an initial revision of an audio server. (Closed) Base URL: https://github.com/domokit/mojo.git@change4
Patch Set: fix issues discovered with initial preflight Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/logging.h"
6 #include "services/media/audio/platform/generic/mixer.h"
7 #include "services/media/audio/platform/generic/mixers/no_op.h"
8 #include "services/media/audio/platform/generic/mixers/point_sampler.h"
9
10 namespace mojo {
11 namespace media {
12 namespace audio {
13
14 Mixer::Mixer() {}
15 Mixer::~Mixer() {}
16
17 MixerPtr Mixer::Select(const LpcmMediaTypeDetailsPtr& src_format,
18 const LpcmMediaTypeDetailsPtr& dst_format) {
19 // We should always have a source format.
20 DCHECK(src_format);
21
22 // If we don't have a destination format, just stick with no-op. This is
23 // probably the ThrottleOutput we are picking a mixer for.
24 if (!dst_format) { return MixerPtr(new mixers::NoOp()); }
25
26 return mixers::PointSampler::Select(src_format, dst_format);
27 }
28
29 } // namespace audio
30 } // namespace media
31 } // namespace mojo
OLDNEW
« no previous file with comments | « services/media/audio/platform/generic/mixer.h ('k') | services/media/audio/platform/generic/mixers/mixer_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698