OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 25 matching lines...) Expand all Loading... |
36 | 36 |
37 class AudioBus; | 37 class AudioBus; |
38 class HRTFDatabaseLoader; | 38 class HRTFDatabaseLoader; |
39 | 39 |
40 // Abstract base class for panning a mono or stereo source. | 40 // Abstract base class for panning a mono or stereo source. |
41 | 41 |
42 class PLATFORM_EXPORT Panner { | 42 class PLATFORM_EXPORT Panner { |
43 public: | 43 public: |
44 enum { | 44 enum { |
45 PanningModelEqualPower = 0, | 45 PanningModelEqualPower = 0, |
46 PanningModelHRTF = 1, | 46 PanningModelHRTF = 1 |
47 PanningModelSoundField = 2 | |
48 }; | 47 }; |
49 | 48 |
50 typedef unsigned PanningModel; | 49 typedef unsigned PanningModel; |
51 | 50 |
52 static PassOwnPtr<Panner> create(PanningModel, float sampleRate, HRTFDatabas
eLoader*); | 51 static PassOwnPtr<Panner> create(PanningModel, float sampleRate, HRTFDatabas
eLoader*); |
53 | 52 |
54 virtual ~Panner() { }; | 53 virtual ~Panner() { }; |
55 | 54 |
56 PanningModel panningModel() const { return m_panningModel; } | 55 PanningModel panningModel() const { return m_panningModel; } |
57 | 56 |
58 virtual void pan(double azimuth, double elevation, const AudioBus* inputBus,
AudioBus* outputBus, size_t framesToProcess) = 0; | 57 virtual void pan(double azimuth, double elevation, const AudioBus* inputBus,
AudioBus* outputBus, size_t framesToProcess) = 0; |
59 | 58 |
60 virtual void reset() = 0; | 59 virtual void reset() = 0; |
61 | 60 |
62 virtual double tailTime() const = 0; | 61 virtual double tailTime() const = 0; |
63 virtual double latencyTime() const = 0; | 62 virtual double latencyTime() const = 0; |
64 | 63 |
65 protected: | 64 protected: |
66 Panner(PanningModel model) : m_panningModel(model) { } | 65 Panner(PanningModel model) : m_panningModel(model) { } |
67 | 66 |
68 PanningModel m_panningModel; | 67 PanningModel m_panningModel; |
69 }; | 68 }; |
70 | 69 |
71 } // namespace WebCore | 70 } // namespace WebCore |
72 | 71 |
73 #endif // Panner_h | 72 #endif // Panner_h |
OLD | NEW |