Chromium Code Reviews| Index: Source/platform/audio/StereoPanner.h |
| diff --git a/Source/platform/audio/StereoPanner.h b/Source/platform/audio/StereoPanner.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..26195e01e908a9f9c28951207ed58092b8056ce4 |
| --- /dev/null |
| +++ b/Source/platform/audio/StereoPanner.h |
| @@ -0,0 +1,35 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef StereoPanner_h |
| +#define StereoPanner_h |
| + |
| +#include "platform/audio/Spatializer.h" |
| + |
| +namespace blink { |
| + |
| +// Common type of stereo panner as found in normal audio mixing equipment. |
| +class PLATFORM_EXPORT StereoPanner final : public Spatializer { |
| +public: |
| + StereoPanner(float sampleRate); |
|
haraken
2014/11/13 02:08:27
Add explicit.
hongchan
2014/11/13 18:38:20
Done.
|
| + |
| + virtual void panWithSampleAccurateValues(const AudioBus* inputBus, AudioBus* outputBuf, const float* panValues, size_t framesToProcess) override; |
| + virtual void panToTargetValue(const AudioBus* inputBus, AudioBus* outputBuf, float panValue, size_t framesToProcess) override; |
| + |
| + virtual void reset() override { } |
| + |
| + virtual double tailTime() const override { return 0; } |
| + virtual double latencyTime() const override { return 0; } |
| + |
| +private: |
| + bool m_isFirstRender; |
| + double m_smoothingConstant; |
| + |
| + double m_gainL; |
| + double m_gainR; |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // StereoPanner_h |