OLD | NEW |
(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 |
OLD | NEW |