diff options
author | Joerg Mueller <nexyon@gmail.com> | 2010-01-01 08:09:30 +0300 |
---|---|---|
committer | Joerg Mueller <nexyon@gmail.com> | 2010-01-01 08:09:30 +0300 |
commit | 174eccf07851c4e7f669b194cd8951ca98bc5c81 (patch) | |
tree | 42d11467df2d006fcbaa562023ffe09796879716 /intern/audaspace/FX/AUD_LoopReader.cpp | |
parent | 3fa927a42e893709ac78f7d9419c22979b05bf3f (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_LoopReader.cpp')
-rw-r--r-- | intern/audaspace/FX/AUD_LoopReader.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/intern/audaspace/FX/AUD_LoopReader.cpp b/intern/audaspace/FX/AUD_LoopReader.cpp index 9e270321013..7d70fc20221 100644 --- a/intern/audaspace/FX/AUD_LoopReader.cpp +++ b/intern/audaspace/FX/AUD_LoopReader.cpp @@ -27,7 +27,6 @@ #include "AUD_Buffer.h" #include <cstring> -#include <stdio.h> AUD_LoopReader::AUD_LoopReader(AUD_IReader* reader, int loop) : AUD_EffectReader(reader), m_loop(loop) @@ -62,7 +61,8 @@ bool AUD_LoopReader::notify(AUD_Message &message) void AUD_LoopReader::read(int & length, sample_t* & buffer) { - int samplesize = AUD_SAMPLE_SIZE(m_reader->getSpecs()); + AUD_Specs specs = m_reader->getSpecs(); + int samplesize = AUD_SAMPLE_SIZE(specs); int len = length; @@ -72,10 +72,10 @@ void AUD_LoopReader::read(int & length, sample_t* & buffer) { int pos = 0; - if(m_buffer->getSize() < length*samplesize) - m_buffer->resize(length*samplesize); + if(m_buffer->getSize() < length * samplesize) + m_buffer->resize(length * samplesize); - memcpy(m_buffer->getBuffer() + pos * samplesize, + memcpy(m_buffer->getBuffer() + pos * specs.channels, buffer, len * samplesize); pos += len; @@ -93,7 +93,7 @@ void AUD_LoopReader::read(int & length, sample_t* & buffer) if(!len) break; - memcpy(m_buffer->getBuffer() + pos * samplesize, + memcpy(m_buffer->getBuffer() + pos * specs.channels, buffer, len * samplesize); pos += len; |