mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-05 05:05:43 +01:00
merge 3578:4901 of thirdparty/rubberband/current
git-svn-id: svn://localhost/ardour2/branches/3.0@4982 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
c2b12f05f4
commit
1ff9e8afc0
20 changed files with 125 additions and 18 deletions
|
|
@ -65,5 +65,19 @@ SpectralDifferenceAudioCurve::process(const float *R__ mag, size_t increment)
|
|||
return result;
|
||||
}
|
||||
|
||||
float
|
||||
SpectralDifferenceAudioCurve::processDouble(const double *R__ mag, size_t increment)
|
||||
{
|
||||
float result = 0.0;
|
||||
|
||||
for (size_t n = 0; n <= m_windowSize / 2; ++n) {
|
||||
result += sqrtf(fabsf((mag[n] * mag[n]) -
|
||||
(m_prevMag[n] * m_prevMag[n])));
|
||||
m_prevMag[n] = (float)mag[n];
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue