Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Mueller <nexyon@gmail.com>2020-08-03 18:40:31 +0300
committerJoerg Mueller <nexyon@gmail.com>2020-08-03 18:42:36 +0300
commit3593dff147ae2a13c07e6338cb0d6a71218596b1 (patch)
tree37dcc3a85b4337a88a35bf251ab5eaf020632565 /extern/audaspace
parentd66009f179cf7505e15d1a6a503f3ad9c4b1435d (diff)
Fix T79374: Render audio produces random clipping
Port of the bugfix from audaspace upstream.
Diffstat (limited to 'extern/audaspace')
-rw-r--r--extern/audaspace/src/respec/JOSResampleReader.cpp8
1 files changed, 4 insertions, 4 deletions
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;\