| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 size_t frames_to_process) override; | 49 size_t frames_to_process) override; |
| 50 void Reset() override { biquad_.Reset(); } | 50 void Reset() override { biquad_.Reset(); } |
| 51 | 51 |
| 52 // Get the magnitude and phase response of the filter at the given | 52 // Get the magnitude and phase response of the filter at the given |
| 53 // set of frequencies (in Hz). The phase response is in radians. | 53 // set of frequencies (in Hz). The phase response is in radians. |
| 54 void GetFrequencyResponse(int n_frequencies, | 54 void GetFrequencyResponse(int n_frequencies, |
| 55 const float* frequency_hz, | 55 const float* frequency_hz, |
| 56 float* mag_response, | 56 float* mag_response, |
| 57 float* phase_response); | 57 float* phase_response); |
| 58 | 58 |
| 59 bool RequiresTailProcessing() const override; |
| 59 double TailTime() const override; | 60 double TailTime() const override; |
| 60 double LatencyTime() const override; | 61 double LatencyTime() const override; |
| 61 | 62 |
| 62 protected: | 63 protected: |
| 63 Biquad biquad_; | 64 Biquad biquad_; |
| 64 BiquadProcessor* GetBiquadProcessor() { | 65 BiquadProcessor* GetBiquadProcessor() { |
| 65 return static_cast<BiquadProcessor*>(Processor()); | 66 return static_cast<BiquadProcessor*>(Processor()); |
| 66 } | 67 } |
| 67 | 68 |
| 68 // To prevent audio glitches when parameters are changed, | 69 // To prevent audio glitches when parameters are changed, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 83 // Synchronize process() with getting and setting the filter coefficients. | 84 // Synchronize process() with getting and setting the filter coefficients. |
| 84 mutable Mutex process_lock_; | 85 mutable Mutex process_lock_; |
| 85 | 86 |
| 86 // The current tail time for biquad filter. | 87 // The current tail time for biquad filter. |
| 87 double tail_time_; | 88 double tail_time_; |
| 88 }; | 89 }; |
| 89 | 90 |
| 90 } // namespace blink | 91 } // namespace blink |
| 91 | 92 |
| 92 #endif // BiquadDSPKernel_h | 93 #endif // BiquadDSPKernel_h |
| OLD | NEW |