[Bf-blender-cvs] [31e1a31] master: Bugfix T41133: Audio: Speakers with animated pitch cause clicks in rendered animations, crashes or huge filesizes in rendered audio

Jörg Müller noreply at git.blender.org
Mon Jul 21 14:25:22 CEST 2014


Commit: 31e1a31feed3adbfba85ed319447fc13e9b454ee
Author: Jörg Müller
Date:   Mon Jul 21 14:24:37 2014 +0200
Branches: master
https://developer.blender.org/rB31e1a31feed3adbfba85ed319447fc13e9b454ee

Bugfix T41133: Audio: Speakers with animated pitch cause clicks in rendered animations, crashes or huge filesizes in rendered audio

Crash happened when the pitch value got <= 0, preventing this now.

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

M	intern/audaspace/FX/AUD_PitchReader.cpp
M	intern/audaspace/intern/AUD_SoftwareDevice.cpp

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

diff --git a/intern/audaspace/FX/AUD_PitchReader.cpp b/intern/audaspace/FX/AUD_PitchReader.cpp
index 218af4f..b3775c7 100644
--- a/intern/audaspace/FX/AUD_PitchReader.cpp
+++ b/intern/audaspace/FX/AUD_PitchReader.cpp
@@ -48,5 +48,7 @@ float AUD_PitchReader::getPitch() const
 
 void AUD_PitchReader::setPitch(float pitch)
 {
+	if(pitch <= 0)
+		pitch = 1;
 	m_pitch = pitch;
 }
diff --git a/intern/audaspace/intern/AUD_SoftwareDevice.cpp b/intern/audaspace/intern/AUD_SoftwareDevice.cpp
index 7bf59cd..6ffa5e1 100644
--- a/intern/audaspace/intern/AUD_SoftwareDevice.cpp
+++ b/intern/audaspace/intern/AUD_SoftwareDevice.cpp
@@ -422,6 +422,8 @@ bool AUD_SoftwareDevice::AUD_SoftwareHandle::setPitch(float pitch)
 {
 	if(!m_status)
 		return false;
+	if(pitch <= 0)
+		pitch = 1;
 	m_user_pitch = pitch;
 	return true;
 }




More information about the Bf-blender-cvs mailing list