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

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
« no previous file with comments | « Source/modules/webaudio/StereoPannerNode.idl ('k') | Source/platform/audio/Spatializer.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 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 GarbageCollected<Spatializer> {
17 public:
18 enum {
19 PanningModelEqualPower = 0
tkent 2014/11/14 01:20:03 enum with only one item looks non-sense. If you h
hongchan 2014/11/14 22:54:57 Done.
20 };
21
22 typedef unsigned PanningModel;
23
24 static Spatializer* create(PanningModel, float sampleRate);
25
26 // Handle sample-accurate panning by AudioParam automation.
27 virtual void panWithSampleAccurateValues(const AudioBus* inputBus, AudioBus* outputBuf, const float* panValues, size_t framesToProcess) = 0;
28
29 // Handle de-zippered panning to a target value.
30 virtual void panToTargetValue(const AudioBus* inputBus, AudioBus* outputBuf, float panValue, size_t framesToProcess) = 0;
31
32 virtual void reset() = 0;
33 virtual double tailTime() const = 0;
34 virtual double latencyTime() const = 0;
35
36 virtual void trace(Visitor*) { }
37
38 protected:
39 explicit Spatializer(PanningModel model) { }
40 };
41
42 } // namespace blink
43
44 #endif // Spatializer_h
OLDNEW
« no previous file with comments | « Source/modules/webaudio/StereoPannerNode.idl ('k') | Source/platform/audio/Spatializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698