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

Side by Side Diff: Source/platform/audio/StereoPanner.h

Issue 691143007: Implement StereoPannerNode for robust stereo panning (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
« no previous file with comments | « Source/platform/audio/Spatializer.cpp ('k') | Source/platform/audio/StereoPanner.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 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 #ifndef StereoPanner_h
6 #define StereoPanner_h
7
8 #include "platform/audio/Spatializer.h"
9
10 namespace blink {
11
12 // Common type of stereo panner as found in normal audio mixing equipment.
13 class PLATFORM_EXPORT StereoPanner final : public Spatializer {
14 public:
15 explicit StereoPanner(float sampleRate);
16
17 virtual void panWithSampleAccurateValues(const AudioBus* inputBus, AudioBus* outputBuf, const float* panValues, size_t framesToProcess) override;
18 virtual void panToTargetValue(const AudioBus* inputBus, AudioBus* outputBuf, float panValue, size_t framesToProcess) override;
19
20 virtual void reset() override { }
21
22 virtual double tailTime() const override { return 0; }
23 virtual double latencyTime() const override { return 0; }
24
25 private:
26 bool m_isFirstRender;
27 double m_smoothingConstant;
28
29 double m_gainL;
30 double m_gainR;
31 };
32
33 } // namespace blink
34
35 #endif // StereoPanner_h
OLDNEW
« no previous file with comments | « Source/platform/audio/Spatializer.cpp ('k') | Source/platform/audio/StereoPanner.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698