Add methods to compute magnitude and phase response for biquads
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 5 Nov 2011 00:34:25 +0000 (00:34 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 5 Nov 2011 00:34:25 +0000 (00:34 +0000)
commit3b4548f1fbceaa085733b83a25384d7dc8156a71
tree89cf4f0a30c40256dc08a1f34b9e558687c4d2f7
parent0d29b3ffdc13e2c1373f89db7ac99732b2bf5037
   Add methods to compute magnitude and phase response for biquads
       https://bugs.webkit.org/show_bug.cgi?id=71055

       Reviewed by Kenneth Russell.

Patch by Raymond Toy <rtoy@google.com> on 2011-11-04

* platform/audio/Biquad.cpp:
(WebCore::Biquad::getFrequencyResponse):
Computes the magnitude and phase (radians) response for the given
biquad at the specified set of (normalized) frequencies.
* platform/audio/Biquad.h:
Declare getFrequencyResponse.
* webaudio/BiquadDSPKernel.cpp:
(WebCore::BiquadDSPKernel::updateCoefficientsIfNecessary):
Factor out the code that updates filter coefficients.  Allow the
caller to specify whether the smoothed values are used or not and
whether we do the update even if the coefficients are not dirty.
(WebCore::BiquadDSPKernel::process):
Use updateCoefficientsIfNecessary to update.
(WebCore::BiquadDSPKernel::getFrequencyResponse):
Implmentation of getFrequencyResponse.
* webaudio/BiquadDSPKernel.h:
Declare getFrequencyResponse.
* webaudio/BiquadFilterNode.cpp:
(WebCore::BiquadFilterNode::getFrequencyResponse):
Implementation of getFrequencyResponse
* webaudio/BiquadFilterNode.h:
Declare getFrequencyResponse.
* webaudio/BiquadFilterNode.idl:
Define interface to getFrequencyResponse.
* webaudio/BiquadProcessor.cpp:
(WebCore::BiquadProcessor::checkForDirtyCoefficients):
Factor out code for checking for dirty coefficients.
(WebCore::BiquadProcessor::process):
Use checkForDirtyCoefficients.
(WebCore::BiquadProcessor::getFrequencyResponse):
Implementation of getFrequencyResponse
* webaudio/BiquadProcessor.h:
Declare getFrequencyResponse.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99337 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/audio/Biquad.cpp
Source/WebCore/platform/audio/Biquad.h
Source/WebCore/webaudio/BiquadDSPKernel.cpp
Source/WebCore/webaudio/BiquadDSPKernel.h
Source/WebCore/webaudio/BiquadFilterNode.cpp
Source/WebCore/webaudio/BiquadFilterNode.h
Source/WebCore/webaudio/BiquadFilterNode.idl
Source/WebCore/webaudio/BiquadProcessor.cpp
Source/WebCore/webaudio/BiquadProcessor.h