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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/BiquadDSPKernel.h

Issue 2839063003: Implement tail processing for AudioNodes (Closed)
Patch Set: Make declaration order consistent Created 3 years, 5 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
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698