OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010, Google Inc. All rights reserved. | 2 * Copyright (C) 2010, 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 20 matching lines...) Expand all Loading... |
31 #include "platform/audio/Panner.h" | 31 #include "platform/audio/Panner.h" |
32 | 32 |
33 namespace blink { | 33 namespace blink { |
34 | 34 |
35 class PLATFORM_EXPORT HRTFPanner final : public Panner { | 35 class PLATFORM_EXPORT HRTFPanner final : public Panner { |
36 public: | 36 public: |
37 HRTFPanner(float sampleRate, HRTFDatabaseLoader*); | 37 HRTFPanner(float sampleRate, HRTFDatabaseLoader*); |
38 ~HRTFPanner() override; | 38 ~HRTFPanner() override; |
39 | 39 |
40 // Panner | 40 // Panner |
41 void pan(double azimuth, double elevation, const AudioBus* inputBus, AudioBu
s* outputBus, size_t framesToProcess) override; | 41 void pan(double azimuth, double elevation, const AudioBus* inputBus, AudioBu
s* outputBus, size_t framesToProcess, AudioBus::ChannelInterpretation) override; |
42 void panWithSampleAccurateValues(double* azimuth, double* elevation, const A
udioBus* inputBus, AudioBus* outputBus, size_t framesToProcess) override; | 42 void panWithSampleAccurateValues(double* azimuth, double* elevation, const A
udioBus* inputBus, AudioBus* outputBus, size_t framesToProcess, AudioBus::Channe
lInterpretation) override; |
43 | 43 |
44 void reset() override; | 44 void reset() override; |
45 | 45 |
46 size_t fftSize() const { return fftSizeForSampleRate(m_sampleRate); } | 46 size_t fftSize() const { return fftSizeForSampleRate(m_sampleRate); } |
47 static size_t fftSizeForSampleRate(float sampleRate); | 47 static size_t fftSizeForSampleRate(float sampleRate); |
48 | 48 |
49 float sampleRate() const { return m_sampleRate; } | 49 float sampleRate() const { return m_sampleRate; } |
50 | 50 |
51 double tailTime() const override; | 51 double tailTime() const override; |
52 double latencyTime() const override; | 52 double latencyTime() const override; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 | 102 |
103 AudioFloatArray m_tempL1; | 103 AudioFloatArray m_tempL1; |
104 AudioFloatArray m_tempR1; | 104 AudioFloatArray m_tempR1; |
105 AudioFloatArray m_tempL2; | 105 AudioFloatArray m_tempL2; |
106 AudioFloatArray m_tempR2; | 106 AudioFloatArray m_tempR2; |
107 }; | 107 }; |
108 | 108 |
109 } // namespace blink | 109 } // namespace blink |
110 | 110 |
111 #endif // HRTFPanner_h | 111 #endif // HRTFPanner_h |
OLD | NEW |