[Bf-blender-cvs] [2fa593a] master: Fix T43853: Audio animation bug (fcurves)

Jörg Müller noreply at git.blender.org
Mon Mar 16 11:02:48 CET 2015


Commit: 2fa593a6f7d0dcf4a638180da1afd6d10afc3ac5
Author: Jörg Müller
Date:   Mon Mar 16 23:02:04 2015 +1300
Branches: master
https://developer.blender.org/rB2fa593a6f7d0dcf4a638180da1afd6d10afc3ac5

Fix T43853: Audio animation bug (fcurves)

For a detailed bug explanation see the comments in the report.

===================================================================

M	intern/audaspace/intern/AUD_AnimateableProperty.cpp

===================================================================

diff --git a/intern/audaspace/intern/AUD_AnimateableProperty.cpp b/intern/audaspace/intern/AUD_AnimateableProperty.cpp
index 9f399a0..e0bc18e 100644
--- a/intern/audaspace/intern/AUD_AnimateableProperty.cpp
+++ b/intern/audaspace/intern/AUD_AnimateableProperty.cpp
@@ -119,13 +119,11 @@ void AUD_AnimateableProperty::write(const float* data, int position, int count)
 	{
 		m_unknown.push_back(Unknown(pos, position - 1));
 
+		// if the buffer was not animated before, we copy the previous static value
 		if(pos == 0)
-		{
-			for(int i = 0; i < position; i++)
-				memcpy(buf + i * m_count, data, m_count * sizeof(float));
-		}
-		else
-			updateUnknownCache(pos, position - 1);
+			pos = 1;
+
+		updateUnknownCache(pos, position - 1);
 	}
 	// otherwise it's not at the end, let's check if some unknown part got filled
 	else




More information about the Bf-blender-cvs mailing list