| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 HighPass = 1, | 43 HighPass = 1, |
| 44 BandPass = 2, | 44 BandPass = 2, |
| 45 LowShelf = 3, | 45 LowShelf = 3, |
| 46 HighShelf = 4, | 46 HighShelf = 4, |
| 47 Peaking = 5, | 47 Peaking = 5, |
| 48 Notch = 6, | 48 Notch = 6, |
| 49 Allpass = 7 | 49 Allpass = 7 |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 BiquadProcessor(float sampleRate, size_t numberOfChannels, AudioParamHandler
& frequency, AudioParamHandler& q, AudioParamHandler& gain, AudioParamHandler& d
etune); | 52 BiquadProcessor(float sampleRate, size_t numberOfChannels, AudioParamHandler
& frequency, AudioParamHandler& q, AudioParamHandler& gain, AudioParamHandler& d
etune); |
| 53 virtual ~BiquadProcessor(); | 53 ~BiquadProcessor() override; |
| 54 | 54 |
| 55 virtual PassOwnPtr<AudioDSPKernel> createKernel() override; | 55 PassOwnPtr<AudioDSPKernel> createKernel() override; |
| 56 | 56 |
| 57 virtual void process(const AudioBus* source, AudioBus* destination, size_t f
ramesToProcess) override; | 57 void process(const AudioBus* source, AudioBus* destination, size_t framesToP
rocess) override; |
| 58 | 58 |
| 59 // Get the magnitude and phase response of the filter at the given | 59 // Get the magnitude and phase response of the filter at the given |
| 60 // set of frequencies (in Hz). The phase response is in radians. | 60 // set of frequencies (in Hz). The phase response is in radians. |
| 61 void getFrequencyResponse(int nFrequencies, const float* frequencyHz, float*
magResponse, float* phaseResponse); | 61 void getFrequencyResponse(int nFrequencies, const float* frequencyHz, float*
magResponse, float* phaseResponse); |
| 62 | 62 |
| 63 void checkForDirtyCoefficients(); | 63 void checkForDirtyCoefficients(); |
| 64 | 64 |
| 65 bool filterCoefficientsDirty() const { return m_filterCoefficientsDirty; } | 65 bool filterCoefficientsDirty() const { return m_filterCoefficientsDirty; } |
| 66 bool hasSampleAccurateValues() const { return m_hasSampleAccurateValues; } | 66 bool hasSampleAccurateValues() const { return m_hasSampleAccurateValues; } |
| 67 | 67 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 84 // so DSP kernels know when to re-compute coefficients | 84 // so DSP kernels know when to re-compute coefficients |
| 85 bool m_filterCoefficientsDirty; | 85 bool m_filterCoefficientsDirty; |
| 86 | 86 |
| 87 // Set to true if any of the filter parameters are sample-accurate. | 87 // Set to true if any of the filter parameters are sample-accurate. |
| 88 bool m_hasSampleAccurateValues; | 88 bool m_hasSampleAccurateValues; |
| 89 }; | 89 }; |
| 90 | 90 |
| 91 } // namespace blink | 91 } // namespace blink |
| 92 | 92 |
| 93 #endif // BiquadProcessor_h | 93 #endif // BiquadProcessor_h |
| OLD | NEW |