diff options
| author | Pierre Bourdon <delroth@gmail.com> | 2014-07-11 16:37:42 +0200 |
|---|---|---|
| committer | Pierre Bourdon <delroth@gmail.com> | 2014-07-11 16:37:42 +0200 |
| commit | 84bf097fb76304eb27d625e5f221dfb5ce922b1f (patch) | |
| tree | 57079ff88525dade11b2d1901357e221df6ddab7 /Source/Core/AudioCommon/DPL2Decoder.cpp | |
| parent | 326af097d9708ea49d54996aec46a7fa328cec1e (diff) | |
| parent | 7e79806efcd5c5e41efea89fa385b480ac1882f5 (diff) | |
Merge pull request #579 from degasus/statics
Mark unexported global variables and functions as statics.
Diffstat (limited to 'Source/Core/AudioCommon/DPL2Decoder.cpp')
| -rw-r--r-- | Source/Core/AudioCommon/DPL2Decoder.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/Source/Core/AudioCommon/DPL2Decoder.cpp b/Source/Core/AudioCommon/DPL2Decoder.cpp index 1cddf54600..c82a160b29 100644 --- a/Source/Core/AudioCommon/DPL2Decoder.cpp +++ b/Source/Core/AudioCommon/DPL2Decoder.cpp @@ -23,18 +23,18 @@ #define M_SQRT1_2 0.70710678118654752440 #endif -int olddelay = -1; -unsigned int oldfreq = 0; -unsigned int dlbuflen; -int cyc_pos; -float l_fwr, r_fwr, lpr_fwr, lmr_fwr; -std::vector<float> fwrbuf_l, fwrbuf_r; -float adapt_l_gain, adapt_r_gain, adapt_lpr_gain, adapt_lmr_gain; -std::vector<float> lf, rf, lr, rr, cf, cr; -float LFE_buf[256]; -unsigned int lfe_pos; -float *filter_coefs_lfe; -unsigned int len125; +static int olddelay = -1; +static unsigned int oldfreq = 0; +static unsigned int dlbuflen; +static int cyc_pos; +static float l_fwr, r_fwr, lpr_fwr, lmr_fwr; +static std::vector<float> fwrbuf_l, fwrbuf_r; +static float adapt_l_gain, adapt_r_gain, adapt_lpr_gain, adapt_lmr_gain; +static std::vector<float> lf, rf, lr, rr, cf, cr; +static float LFE_buf[256]; +static unsigned int lfe_pos; +static float *filter_coefs_lfe; +static unsigned int len125; template<class T,class _ftype_t> static _ftype_t dotproduct(int count,const T *buf,const _ftype_t *coefficients) { @@ -83,7 +83,7 @@ template<class T> static T firfilter(const T *buf, int pos, int len, int count, // n window length // w buffer for the window parameters */ -void hamming(int n, float* w) +static void hamming(int n, float* w) { int i; float k = float(2*M_PI/((float)(n-1))); // 2*pi/(N-1) @@ -110,7 +110,7 @@ opt beta constant used only when designing using kaiser windows returns 0 if OK, -1 if fail */ -float* design_fir(unsigned int *n, float* fc, float opt) +static float* design_fir(unsigned int *n, float* fc, float opt) { unsigned int o = *n & 1; // Indicator for odd filter length unsigned int end = ((*n + 1) >> 1) - o; // Loop end @@ -165,7 +165,7 @@ float* design_fir(unsigned int *n, float* fc, float opt) return w; } -void onSeek(void) +static void onSeek(void) { l_fwr = r_fwr = lpr_fwr = lmr_fwr = 0; std::fill(fwrbuf_l.begin(), fwrbuf_l.end(), 0.0f); @@ -181,7 +181,7 @@ void onSeek(void) memset(LFE_buf, 0, sizeof(LFE_buf)); } -void done(void) +static void done(void) { onSeek(); if (filter_coefs_lfe) @@ -191,7 +191,7 @@ void done(void) filter_coefs_lfe = nullptr; } -float* calc_coefficients_125Hz_lowpass(int rate) +static float* calc_coefficients_125Hz_lowpass(int rate) { len125 = 256; float f = 125.0f / (rate / 2); @@ -204,7 +204,7 @@ float* calc_coefficients_125Hz_lowpass(int rate) return coeffs; } -float passive_lock(float x) +static float passive_lock(float x) { static const float MATAGCLOCK = 0.2f; /* AGC range (around 1) where the matrix behaves passively */ const float x1 = x - 1; @@ -212,7 +212,7 @@ float passive_lock(float x) return x1 - x1 / (1 + ax1s * ax1s) + 1; } -void matrix_decode(const float *in, const int k, const int il, +static void matrix_decode(const float *in, const int k, const int il, const int ir, bool decode_rear, const int _dlbuflen, float _l_fwr, float _r_fwr, |
