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

Side by Side Diff: Source/platform/audio/Spatializer.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
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 Spatializer_h
6 #define Spatializer_h
7
8 #include "platform/PlatformExport.h"
9 #include "platform/heap/Handle.h"
10
11 namespace blink {
12
13 class AudioBus;
14
15 // Abstract base class for spatializing a mono or stereo source.
16 class PLATFORM_EXPORT Spatializer : public GarbageCollectedFinalized<Spatializer > {
haraken 2014/11/13 02:08:27 I guess "Finalized" is not needed.
hongchan 2014/11/13 18:38:20 Done.
17 public:
18 enum {
19 PanningModelEqualPower = 0
20 };
21
22 typedef unsigned PanningModel;
23
24 static Spatializer* create(PanningModel, float sampleRate);
25
26 virtual ~Spatializer() { };
haraken 2014/11/13 02:08:27 You can remove this destructor.
hongchan 2014/11/13 18:38:20 Done.
27
28 // Handle sample-accurate panning by AudioParam automation.
29 virtual void panWithSampleAccurateValues(const AudioBus* inputBus, AudioBus* outputBuf, const float* panValues, size_t framesToProcess) = 0;
30
31 // Handle de-zippered panning to a target value.
32 virtual void panToTargetValue(const AudioBus* inputBus, AudioBus* outputBuf, float panValue, size_t framesToProcess) = 0;
33
34 virtual void reset() = 0;
35 virtual double tailTime() const = 0;
36 virtual double latencyTime() const = 0;
37
38 virtual void trace(Visitor*) { }
39
40 protected:
41 Spatializer(PanningModel model) { }
haraken 2014/11/13 02:08:27 Add explicit.
hongchan 2014/11/13 18:38:20 Done.
42 };
43
44 } // namespace blink
45
46 #endif // Spatializer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698