Merging with trunk up to r38631.
[blender.git] / intern / audaspace / FX / AUD_EnvelopeFactory.cpp
index 3057c7b7d62e45229fdf9f21c1dbe3cdcb6ed666..80df7e9f8748e249c5fce9610c5bb32a97103b62 100644 (file)
@@ -73,8 +73,8 @@ AUD_Reference<AUD_IReader> AUD_EnvelopeFactory::createReader()
 
        EnvelopeParameters* param = new EnvelopeParameters();
        param->arthreshold = m_arthreshold;
-       param->attack = pow(m_arthreshold, 1.0f/(reader->getSpecs().rate * m_attack));
-       param->release = pow(m_arthreshold, 1.0f/(reader->getSpecs().rate * m_release));
+       param->attack = pow(m_arthreshold, 1.0f/(static_cast<float>(reader->getSpecs().rate) * m_attack));
+       param->release = pow(m_arthreshold, 1.0f/(static_cast<float>(reader->getSpecs().rate) * m_release));
        param->threshold = m_threshold;
 
        return new AUD_CallbackIIRFilterReader(reader, 1, 2,