diff options
author | Joerg Mueller <nexyon@gmail.com> | 2010-08-16 15:41:07 +0400 |
---|---|---|
committer | Joerg Mueller <nexyon@gmail.com> | 2010-08-16 15:41:07 +0400 |
commit | 25fec1592efade86233c0ba71212dc973b618ad1 (patch) | |
tree | 8c6eccaf24d7bf4fa72c5cfc1ca86511d2df0c9d /intern/audaspace/FX/AUD_VolumeFactory.cpp | |
parent | a91d538f47171a40463016b91c22d39d694d923a (diff) | |
parent | 2b7a774ab0dfd3bc66240b387a586b5122ab2661 (diff) |
Audaspace (GSoC): First merging commit
* All audaspace changes from the GSoC branch including the aud Python module
* This commit also includes some minor changes in source/gameengine/Ketsji/KX_PythonInit.cpp:
- Fixing names of some constants
- removing outdated stopDSP() python function
- Autoinclusion of bge instead of GameLogic
- Fix for some error messages: GameLogic -> bge.logic
Diffstat (limited to 'intern/audaspace/FX/AUD_VolumeFactory.cpp')
-rw-r--r-- | intern/audaspace/FX/AUD_VolumeFactory.cpp | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/intern/audaspace/FX/AUD_VolumeFactory.cpp b/intern/audaspace/FX/AUD_VolumeFactory.cpp index fbde608aa12..1b341a5a51a 100644 --- a/intern/audaspace/FX/AUD_VolumeFactory.cpp +++ b/intern/audaspace/FX/AUD_VolumeFactory.cpp @@ -24,34 +24,23 @@ */ #include "AUD_VolumeFactory.h" -#include "AUD_VolumeReader.h" +#include "AUD_IIRFilterReader.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() + 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; + std::vector<float> a, b; + a.push_back(1); + b.push_back(m_volume); + return new AUD_IIRFilterReader(getReader(), b, a); } |