Fix T43853: Audio animation bug (fcurves)

For a detailed bug explanation see the comments in the report.
This commit is contained in:
Joerg Mueller 2015-03-16 23:02:04 +13:00 committed by Sergey Sharybin
parent 1f547c14ec
commit 1ad57f287b
Notes: blender-bot 2023-02-14 10:11:54 +01:00
Referenced by issue #43853, Audio animation bug (fcurves)
1 changed files with 4 additions and 6 deletions

View File

@ -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