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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 m_parameter4(detune), | 44 m_parameter4(detune), |
45 m_filterCoefficientsDirty(true), | 45 m_filterCoefficientsDirty(true), |
46 m_hasSampleAccurateValues(false) {} | 46 m_hasSampleAccurateValues(false) {} |
47 | 47 |
48 BiquadProcessor::~BiquadProcessor() { | 48 BiquadProcessor::~BiquadProcessor() { |
49 if (isInitialized()) | 49 if (isInitialized()) |
50 uninitialize(); | 50 uninitialize(); |
51 } | 51 } |
52 | 52 |
53 std::unique_ptr<AudioDSPKernel> BiquadProcessor::createKernel() { | 53 std::unique_ptr<AudioDSPKernel> BiquadProcessor::createKernel() { |
54 return makeUnique<BiquadDSPKernel>(this); | 54 return WTF::makeUnique<BiquadDSPKernel>(this); |
55 } | 55 } |
56 | 56 |
57 void BiquadProcessor::checkForDirtyCoefficients() { | 57 void BiquadProcessor::checkForDirtyCoefficients() { |
58 // Deal with smoothing / de-zippering. Start out assuming filter parameters | 58 // Deal with smoothing / de-zippering. Start out assuming filter parameters |
59 // are not changing. | 59 // are not changing. |
60 | 60 |
61 // The BiquadDSPKernel objects rely on this value to see if they need to | 61 // The BiquadDSPKernel objects rely on this value to see if they need to |
62 // re-compute their internal filter coefficients. | 62 // re-compute their internal filter coefficients. |
63 m_filterCoefficientsDirty = false; | 63 m_filterCoefficientsDirty = false; |
64 m_hasSampleAccurateValues = false; | 64 m_hasSampleAccurateValues = false; |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 | 127 |
128 void BiquadProcessor::getFrequencyResponse(int nFrequencies, | 128 void BiquadProcessor::getFrequencyResponse(int nFrequencies, |
129 const float* frequencyHz, | 129 const float* frequencyHz, |
130 float* magResponse, | 130 float* magResponse, |
131 float* phaseResponse) { | 131 float* phaseResponse) { |
132 // Compute the frequency response on a separate temporary kernel | 132 // Compute the frequency response on a separate temporary kernel |
133 // to avoid interfering with the processing running in the audio | 133 // to avoid interfering with the processing running in the audio |
134 // thread on the main kernels. | 134 // thread on the main kernels. |
135 | 135 |
136 std::unique_ptr<BiquadDSPKernel> responseKernel = | 136 std::unique_ptr<BiquadDSPKernel> responseKernel = |
137 makeUnique<BiquadDSPKernel>(this); | 137 WTF::makeUnique<BiquadDSPKernel>(this); |
138 responseKernel->getFrequencyResponse(nFrequencies, frequencyHz, magResponse, | 138 responseKernel->getFrequencyResponse(nFrequencies, frequencyHz, magResponse, |
139 phaseResponse); | 139 phaseResponse); |
140 } | 140 } |
141 | 141 |
142 } // namespace blink | 142 } // namespace blink |
OLD | NEW |