From 99bbc90266beeedd432981d7332a04ebafae413c Mon Sep 17 00:00:00 2001 From: Joerg Mueller Date: Sat, 19 Jun 2010 10:31:47 +0000 Subject: Deleting my GSoC branch to recreate it. --- intern/audaspace/FX/AUD_VolumeFactory.cpp | 57 ------------------------------- 1 file changed, 57 deletions(-) delete mode 100644 intern/audaspace/FX/AUD_VolumeFactory.cpp (limited to 'intern/audaspace/FX/AUD_VolumeFactory.cpp') diff --git a/intern/audaspace/FX/AUD_VolumeFactory.cpp b/intern/audaspace/FX/AUD_VolumeFactory.cpp deleted file mode 100644 index fbde608aa12..00000000000 --- a/intern/audaspace/FX/AUD_VolumeFactory.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/* - * $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 . - * - * ***** END LGPL LICENSE BLOCK ***** - */ - -#include "AUD_VolumeFactory.h" -#include "AUD_VolumeReader.h" - -AUD_VolumeFactory::AUD_VolumeFactory(AUD_IFactory* factory, float volume) : - AUD_EffectFactory(factory), - m_volume(volume) {} - -AUD_VolumeFactory::AUD_VolumeFactory(float volume) : - AUD_EffectFactory(0), - m_volume(volume) {} - -float AUD_VolumeFactory::getVolume() -{ - return m_volume; -} - -void AUD_VolumeFactory::setVolume(float volume) -{ - m_volume = volume; -} - -AUD_IReader* AUD_VolumeFactory::createReader() -{ - AUD_IReader* reader = getReader(); - - if(reader != 0) - { - reader = new AUD_VolumeReader(reader, m_volume); AUD_NEW("reader") - } - - return reader; -} -- cgit v1.2.3 From 7296600434c49b40215ba842af73a8b1517e12eb Mon Sep 17 00:00:00 2001 From: Joerg Mueller Date: Wed, 28 Jul 2010 09:36:03 +0000 Subject: Audaspace: HUGE Refactor. Some points of the refactor not sorted by importance: * Fixed immutability of readers and factories (there are exceptions...) * Fixed copy constructors and = operators * Removed messaging system * Removed reader types * Added const where possible * Using initalisers when possible * Avoided use of pointers when possible * Removed AUD_NEW and AUD_DELETE macros * Removed useless NULL pointer checks * Fixed exception catching * Fixed some yet unknown bugs * Lots of other stuff --- intern/audaspace/FX/AUD_VolumeFactory.cpp | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) (limited to 'intern/audaspace/FX/AUD_VolumeFactory.cpp') diff --git a/intern/audaspace/FX/AUD_VolumeFactory.cpp b/intern/audaspace/FX/AUD_VolumeFactory.cpp index fbde608aa12..9f0fd5821fd 100644 --- a/intern/audaspace/FX/AUD_VolumeFactory.cpp +++ b/intern/audaspace/FX/AUD_VolumeFactory.cpp @@ -28,30 +28,16 @@ AUD_VolumeFactory::AUD_VolumeFactory(AUD_IFactory* factory, float volume) : AUD_EffectFactory(factory), - m_volume(volume) {} - -AUD_VolumeFactory::AUD_VolumeFactory(float volume) : - AUD_EffectFactory(0), - m_volume(volume) {} - -float AUD_VolumeFactory::getVolume() + m_volume(volume) { - return m_volume; } -void AUD_VolumeFactory::setVolume(float volume) +float AUD_VolumeFactory::getVolume() const { - m_volume = volume; + return m_volume; } -AUD_IReader* AUD_VolumeFactory::createReader() +AUD_IReader* AUD_VolumeFactory::createReader() const { - AUD_IReader* reader = getReader(); - - if(reader != 0) - { - reader = new AUD_VolumeReader(reader, m_volume); AUD_NEW("reader") - } - - return reader; + return new AUD_VolumeReader(getReader(), m_volume); } -- cgit v1.2.3 From 52ef66da4d785414e7ae5a60dd44a01727514169 Mon Sep 17 00:00:00 2001 From: Joerg Mueller Date: Sun, 1 Aug 2010 22:33:50 +0000 Subject: Audaspace: * Created awesome filter classes :) * Made all filter effects use the filter classes instead of having the same implementation everywhere. * Added a Python API for LTI IIR filters. * Fixed a warning in creator.c that was introduced when adding game autoplay. --- intern/audaspace/FX/AUD_VolumeFactory.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'intern/audaspace/FX/AUD_VolumeFactory.cpp') diff --git a/intern/audaspace/FX/AUD_VolumeFactory.cpp b/intern/audaspace/FX/AUD_VolumeFactory.cpp index 9f0fd5821fd..1b341a5a51a 100644 --- a/intern/audaspace/FX/AUD_VolumeFactory.cpp +++ b/intern/audaspace/FX/AUD_VolumeFactory.cpp @@ -24,7 +24,7 @@ */ #include "AUD_VolumeFactory.h" -#include "AUD_VolumeReader.h" +#include "AUD_IIRFilterReader.h" AUD_VolumeFactory::AUD_VolumeFactory(AUD_IFactory* factory, float volume) : AUD_EffectFactory(factory), @@ -39,5 +39,8 @@ float AUD_VolumeFactory::getVolume() const AUD_IReader* AUD_VolumeFactory::createReader() const { - return new AUD_VolumeReader(getReader(), m_volume); + std::vector a, b; + a.push_back(1); + b.push_back(m_volume); + return new AUD_IIRFilterReader(getReader(), b, a); } -- cgit v1.2.3