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

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

Issue 354213002: Initialize value since calculateFinalValues may fail to do so. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/modules/webaudio/AudioParam.cpp ('k') | Source/modules/webaudio/BiquadDSPKernel.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 virtual double tailTime() const OVERRIDE; 56 virtual double tailTime() const OVERRIDE;
57 virtual double latencyTime() const OVERRIDE; 57 virtual double latencyTime() const OVERRIDE;
58 58
59 protected: 59 protected:
60 Biquad m_biquad; 60 Biquad m_biquad;
61 BiquadProcessor* biquadProcessor() { return static_cast<BiquadProcessor*>(pr ocessor()); } 61 BiquadProcessor* biquadProcessor() { return static_cast<BiquadProcessor*>(pr ocessor()); }
62 62
63 // To prevent audio glitches when parameters are changed, 63 // To prevent audio glitches when parameters are changed,
64 // dezippering is used to slowly change the parameters. 64 // dezippering is used to slowly change the parameters.
65 // |useSmoothing| implies that we want to update using the 65 void updateCoefficientsIfNecessary();
66 // smoothed values. Otherwise the final target values are 66 // Update the biquad cofficients with the given parameters
67 // used. If |forceUpdate| is true, we update the coefficients even 67 void updateCoefficients(double frequency, double Q, double gain, double detu ne);
68 // if they are not dirty. (Used when computing the frequency 68
69 // response.) 69 private:
70 void updateCoefficientsIfNecessary(bool useSmoothing, bool forceUpdate); 70 // Synchronize process() with getting and setting the filter coefficients.
71 mutable Mutex m_processLock;
71 }; 72 };
72 73
73 } // namespace WebCore 74 } // namespace WebCore
74 75
75 #endif // BiquadDSPKernel_h 76 #endif // BiquadDSPKernel_h
OLDNEW
« no previous file with comments | « Source/modules/webaudio/AudioParam.cpp ('k') | Source/modules/webaudio/BiquadDSPKernel.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698