From 31e1a31feed3adbfba85ed319447fc13e9b454ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20M=C3=BCller?= Date: Mon, 21 Jul 2014 14:24:37 +0200 Subject: 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. --- intern/audaspace/FX/AUD_PitchReader.cpp | 2 ++ intern/audaspace/intern/AUD_SoftwareDevice.cpp | 2 ++ 2 files changed, 4 insertions(+) (limited to 'intern/audaspace') diff --git a/intern/audaspace/FX/AUD_PitchReader.cpp b/intern/audaspace/FX/AUD_PitchReader.cpp index 218af4fc090..b3775c71a28 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 7bf59cd6f31..6ffa5e1fcae 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; } -- cgit v1.2.3