[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [32797] trunk/blender/intern/audaspace/ intern/AUD_C-API.cpp: Audaspace: Disabling High- and Lowpass for Bake Sound to F-Curve Operator in case they 're unused.
Joerg Mueller
nexyon at gmail.com
Sun Oct 31 15:44:45 CET 2010
Revision: 32797
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32797
Author: nexyon
Date: 2010-10-31 15:44:45 +0100 (Sun, 31 Oct 2010)
Log Message:
-----------
Audaspace: Disabling High- and Lowpass for Bake Sound to F-Curve Operator in case they're unused.
Modified Paths:
--------------
trunk/blender/intern/audaspace/intern/AUD_C-API.cpp
Modified: trunk/blender/intern/audaspace/intern/AUD_C-API.cpp
===================================================================
--- trunk/blender/intern/audaspace/intern/AUD_C-API.cpp 2010-10-31 14:43:30 UTC (rev 32796)
+++ trunk/blender/intern/audaspace/intern/AUD_C-API.cpp 2010-10-31 14:44:45 UTC (rev 32797)
@@ -782,10 +782,20 @@
AUD_Sound* sound;
AUD_FileFactory file(filename);
+
+ AUD_IReader* reader = file.createReader();
+ AUD_SampleRate rate = reader->getSpecs().rate;
+ delete reader;
+
AUD_ChannelMapperFactory mapper(&file, specs);
- AUD_LowpassFactory lowpass(&mapper, high);
- AUD_HighpassFactory highpass(&lowpass, low);
- AUD_EnvelopeFactory envelope(&highpass, attack, release, threshold, 0.1f);
+ sound = &mapper;
+ AUD_LowpassFactory lowpass(sound, high);
+ if(high < rate)
+ sound = &lowpass;
+ AUD_HighpassFactory highpass(sound, low);
+ if(low > 0)
+ sound = &highpass;
+ AUD_EnvelopeFactory envelope(sound, attack, release, threshold, 0.1f);
AUD_LinearResampleFactory resampler(&envelope, specs);
sound = &resampler;
AUD_SquareFactory squaref(sound, sthreshold);
@@ -798,7 +808,7 @@
else if(additive)
sound = ∑
- AUD_IReader* reader = sound->createReader();
+ reader = sound->createReader();
if(reader == NULL)
return NULL;
More information about the Bf-blender-cvs
mailing list