Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Mueller <nexyon@gmail.com>2010-01-01 08:09:30 +0300
committerJoerg Mueller <nexyon@gmail.com>2010-01-01 08:09:30 +0300
commit174eccf07851c4e7f669b194cd8951ca98bc5c81 (patch)
tree42d11467df2d006fcbaa562023ffe09796879716 /intern/audaspace/FX/AUD_ButterworthFactory.cpp
parent3fa927a42e893709ac78f7d9419c22979b05bf3f (diff)
Huge new year audio commit!
* Refactored the whole audaspace library to use float as sample format over all readers. * Added new Readers like the linear resampler, envelope, lowpass, highpass and butterworth. * Note: The butterworth filter isn't working correctly, some bug in there... Maybe also true for the envelope. * Added a sound to f-curve operator that behaves mostly like the soundtracker script of technoestupido.
Diffstat (limited to 'intern/audaspace/FX/AUD_ButterworthFactory.cpp')
-rw-r--r--intern/audaspace/FX/AUD_ButterworthFactory.cpp49
1 files changed, 49 insertions, 0 deletions
diff --git a/intern/audaspace/FX/AUD_ButterworthFactory.cpp b/intern/audaspace/FX/AUD_ButterworthFactory.cpp
new file mode 100644
index 00000000000..fd0a53def7c
--- /dev/null
+++ b/intern/audaspace/FX/AUD_ButterworthFactory.cpp
@@ -0,0 +1,49 @@
+/*
+ * $Id$
+ *
+ * ***** BEGIN LGPL LICENSE BLOCK *****
+ *
+ * Copyright 2009 Jörg Hermann Müller
+ *
+ * This file is part of AudaSpace.
+ *
+ * AudaSpace is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * AudaSpace is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with AudaSpace. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * ***** END LGPL LICENSE BLOCK *****
+ */
+
+#include "AUD_ButterworthFactory.h"
+#include "AUD_ButterworthReader.h"
+
+AUD_ButterworthFactory::AUD_ButterworthFactory(AUD_IFactory* factory,
+ float frequency) :
+ AUD_EffectFactory(factory),
+ m_frequency(frequency) {}
+
+AUD_ButterworthFactory::AUD_ButterworthFactory(float frequency) :
+ AUD_EffectFactory(0),
+ m_frequency(frequency) {}
+
+AUD_IReader* AUD_ButterworthFactory::createReader()
+{
+ AUD_IReader* reader = getReader();
+
+ if(reader != 0)
+ {
+ reader = new AUD_ButterworthReader(reader, m_frequency);
+ AUD_NEW("reader")
+ }
+
+ return reader;
+}