diff options
author | Luo Jinghua <sunmoon1997@gmail.com> | 2009-03-18 14:20:33 +0800 |
---|---|---|
committer | Luo Jinghua <sunmoon1997@gmail.com> | 2009-03-18 14:20:33 +0800 |
commit | d122c4d2da18497e5891942cfb6941a29b035208 (patch) | |
tree | f1cd6abb681137755a606e6604c6a6eeec6810f1 /src | |
parent | 5f97c2f5485b43fe9cb9781ef88bbafa9556b045 (diff) |
Resample: fixed a divide by zero.
Diffstat (limited to 'src')
-rw-r--r-- | src/resampler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/resampler.cpp b/src/resampler.cpp index 978e8a4..2471e10 100644 --- a/src/resampler.cpp +++ b/src/resampler.cpp @@ -36,7 +36,7 @@ namespace audiere { sample_t tmp_r[BUFFER_SIZE]; float delta = m_shift * m_native_sample_rate / m_rate; if (m_shift == 0) { // If shift is zero, which shouldn't be the case, use a shift of 1. - delta = float(m_native_sample_rate / m_rate); + delta = float(m_native_sample_rate) / m_rate; } while (left > 0) { int transfer = std::min(left, int(BUFFER_SIZE)); |