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

Side by Side Diff: third_party/WebKit/Source/platform/audio/Spatializer.h

Issue 2272683003: Remove redundant definition of Spatializer abstract class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix reference URL Created 4 years, 3 months 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 "wtf/Allocator.h"
10 #include "wtf/Noncopyable.h"
11 #include <memory>
12
13 namespace blink {
14
15 class AudioBus;
16
17 // Abstract base class for spatializing a mono or stereo source.
18 class PLATFORM_EXPORT Spatializer {
19 USING_FAST_MALLOC(Spatializer);
20 WTF_MAKE_NONCOPYABLE(Spatializer);
21 public:
22 enum {
23 PanningModelEqualPower = 0
24
25 // We have a plan to add more panning models other than equal-power.
26 // (such as binaural-HRTF or N-channel surround panning)
27 };
28
29 typedef unsigned PanningModel;
30
31 static std::unique_ptr<Spatializer> create(PanningModel, float sampleRate);
32 virtual ~Spatializer();
33
34 // Handle sample-accurate panning by AudioParam automation.
35 virtual void panWithSampleAccurateValues(const AudioBus* inputBus, AudioBus* outputBuf, const float* panValues, size_t framesToProcess) = 0;
36
37 // Handle de-zippered panning to a target value.
38 virtual void panToTargetValue(const AudioBus* inputBus, AudioBus* outputBuf, float panValue, size_t framesToProcess) = 0;
39
40 virtual void reset() = 0;
41 virtual double tailTime() const = 0;
42 virtual double latencyTime() const = 0;
43
44 protected:
45 explicit Spatializer(PanningModel model) { }
46 };
47
48 } // namespace blink
49
50 #endif // Spatializer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698