diff options
author | Joerg Mueller <nexyon@gmail.com> | 2010-02-08 02:41:17 +0300 |
---|---|---|
committer | Joerg Mueller <nexyon@gmail.com> | 2010-02-08 02:41:17 +0300 |
commit | 9827a3e9eac70f68db6dc16d03016c51b7ece3f0 (patch) | |
tree | 8825b454008d3b97a64018884c179ea94874af44 /intern/audaspace/FX | |
parent | 2f72b91a54faa7cfbdfd97eff608c8911df1d221 (diff) |
2.5 Audio:
- recode of the whole sequencer audio handling
- encode audio flag removed, instead you choose None as audio codec, added None for video codec too
- ffmpeg formats/codecs: enabled: theora, ogg, vorbis; added: matroska, flac (not working, who can fix?), mp3, wav
- sequencer wave drawing
- volume animation (now also working when mixing down to a file!)
- made sequencer strip position and length values unanimatable
Diffstat (limited to 'intern/audaspace/FX')
-rw-r--r-- | intern/audaspace/FX/AUD_LoopReader.cpp | 9 | ||||
-rw-r--r-- | intern/audaspace/FX/AUD_LoopReader.h | 5 |
2 files changed, 14 insertions, 0 deletions
diff --git a/intern/audaspace/FX/AUD_LoopReader.cpp b/intern/audaspace/FX/AUD_LoopReader.cpp index 7d70fc20221..3bcd8c2f9d3 100644 --- a/intern/audaspace/FX/AUD_LoopReader.cpp +++ b/intern/audaspace/FX/AUD_LoopReader.cpp @@ -31,6 +31,7 @@ AUD_LoopReader::AUD_LoopReader(AUD_IReader* reader, int loop) : AUD_EffectReader(reader), m_loop(loop) { + m_samples = -1; m_buffer = new AUD_Buffer(); AUD_NEW("buffer") } @@ -51,6 +52,7 @@ bool AUD_LoopReader::notify(AUD_Message &message) if(message.type == AUD_MSG_LOOP) { m_loop = message.loopcount; + m_samples = message.time * m_reader->getSpecs().rate; m_reader->notify(message); @@ -64,6 +66,13 @@ void AUD_LoopReader::read(int & length, sample_t* & buffer) AUD_Specs specs = m_reader->getSpecs(); int samplesize = AUD_SAMPLE_SIZE(specs); + if(m_samples >= 0) + { + if(length > m_samples) + length = m_samples; + m_samples -= length; + } + int len = length; m_reader->read(len, buffer); diff --git a/intern/audaspace/FX/AUD_LoopReader.h b/intern/audaspace/FX/AUD_LoopReader.h index 621ee3493ab..e61a49cb0db 100644 --- a/intern/audaspace/FX/AUD_LoopReader.h +++ b/intern/audaspace/FX/AUD_LoopReader.h @@ -46,6 +46,11 @@ private: */ int m_loop; + /** + * The left samples. + */ + int m_samples; + public: /** * Creates a new loop reader. |