[Bf-blender-cvs] [f9aba4f6e19] blender-v2.90-release: Fix T79374: Render audio produces random clipping
Joerg Mueller
noreply at git.blender.org
Wed Aug 5 14:03:26 CEST 2020
Commit: f9aba4f6e190b9411ab3cd68e9c6d90cc68eb5c7
Author: Joerg Mueller
Date: Mon Aug 3 17:40:31 2020 +0200
Branches: blender-v2.90-release
https://developer.blender.org/rBf9aba4f6e190b9411ab3cd68e9c6d90cc68eb5c7
Fix T79374: Render audio produces random clipping
Port of the bugfix from audaspace upstream.
===================================================================
M extern/audaspace/src/respec/JOSResampleReader.cpp
===================================================================
diff --git a/extern/audaspace/src/respec/JOSResampleReader.cpp b/extern/audaspace/src/respec/JOSResampleReader.cpp
index 6753a2e8b6b..378986fee28 100644
--- a/extern/audaspace/src/respec/JOSResampleReader.cpp
+++ b/extern/audaspace/src/respec/JOSResampleReader.cpp
@@ -119,8 +119,8 @@ void JOSResampleReader::updateBuffer(int size, double factor, int samplesize)
P = int_to_fp(m_L) - P;\
\
end = std::floor((m_len - 1) / double(m_L) + m_P) - 1;\
- if(m_cache_valid - m_n - 2 < end)\
- end = m_cache_valid - m_n - 2;\
+ if(m_cache_valid - int(m_n) - 2 < end)\
+ end = m_cache_valid - int(m_n) - 2;\
\
data = buf + (m_n + 2 + end) * m_channels - 1;\
l = fp_to_int(P);\
@@ -166,8 +166,8 @@ void JOSResampleReader::updateBuffer(int size, double factor, int samplesize)
P = 0 - P;\
\
end = (int_to_fp(m_len) - P) / P_increment - 1;\
- if(m_cache_valid - m_n - 2 < end)\
- end = m_cache_valid - m_n - 2;\
+ if(m_cache_valid - int(m_n) - 2 < end)\
+ end = m_cache_valid - int(m_n) - 2;\
\
P += P_increment * end;\
data = buf + (m_n + 2 + end) * m_channels - 1;\
More information about the Bf-blender-cvs
mailing list