#include <RingBuffer.h>

Public Member Functions | |
| RingBuffer () | |
| Constructors. | |
| RingBuffer (unsigned int nmChannels, unsigned int nmFrames) | |
| RingBuffer (UnitGenerator &input, unsigned int nmChannels, unsigned int nmFrames) | |
| unsigned | seekTo (int position) throw (CException) |
| void | setLoopStart (unsigned frame) |
| void | setLoopEnd (unsigned frame) |
| Calls the setLoopStart of it's tap. | |
| void | nextBuffer (Buffer &outputBuffer) throw (CException) |
| Calls the setLoopEnd of it's tap. | |
| void | writeBuffer (Buffer &inputBuffer) throw (CException) |
| Write a buffer of data into the ring buffer. | |
| void | sumIntoBuffer (Buffer &inputBuffer) throw (CException) |
| Do an adding write of data into the ring buffer. | |
| void | destructiveNextBuffer (Buffer &outputBuffer) throw (CException) |
| Read a buffer zeroing as you go. | |
| void | writeBuffer (Buffer &inputBuffer, unsigned bufNum) throw (CException) |
| write to the receiver | |
| void | sumIntoBuffer (Buffer &inputBuffer, unsigned bufNum) throw (CException) |
Public Attributes | |
| unsigned | mCurrentWriteFrame |
| state -- users can manipulate my internal tap and buffer | |
| Buffer | mBuffer |
| RingBufferTap | mTap |
| internal tap so a RingBuffer can also be a a UnitGenerator | |
Protected Attributes | |
| unsigned | mTempCurrentWriteFrame |
| Used in next buffer to save state between calls in the same block. | |
Friends | |
| class | RingBufferTap |
| Allow the RingBufferTap to access private members of this class. | |
| RingBuffer::RingBuffer | ( | ) |
| RingBuffer::RingBuffer | ( | unsigned int | nmChannels, | |
| unsigned int | nmFrames | |||
| ) |
References csl::Buffer::allocateBuffers(), mBuffer, mTap, and csl::RingBufferTap::setBuffer().
| RingBuffer::RingBuffer | ( | UnitGenerator & | input, | |
| unsigned int | nmChannels, | |||
| unsigned int | nmFrames | |||
| ) |
References csl::Buffer::allocateBuffers(), mBuffer, mTap, and csl::RingBufferTap::setBuffer().
| unsigned RingBuffer::seekTo | ( | int | position | ) | throw (CException) |
| void csl::RingBuffer::setLoopStart | ( | unsigned | frame | ) | [inline] |
These loop setters allow for variable buffer lengths by varying the points where the buffer writes.
References mTap, and csl::RingBufferTap::setLoopStart().
| void csl::RingBuffer::setLoopEnd | ( | unsigned | frame | ) | [inline] |
| void RingBuffer::nextBuffer | ( | Buffer & | outputBuffer | ) | throw (CException) [virtual] |
Calls the setLoopEnd of it's tap.
Various flavours of next buffer. Also the nextBuffer(Buffer &) has to be implemented to be able to hold state of the currentWriteFrame. Otherwise every time it's called by the super nextBuffer the currentWriteFrame would be incremented more and more, leading to erroneous results. Read a buffer from the ring buffer
Reimplemented from csl::UnitGenerator.
References CSL_INPUT, and csl::Effect::pullInput().
| void RingBuffer::writeBuffer | ( | Buffer & | inputBuffer | ) | throw (CException) [virtual] |
Write a buffer of data into the ring buffer.
Reimplemented from csl::Writeable.
References csl::Writeable::writeBuffer().
Referenced by csl::CslRtpSession::OnRTPPacket(), and csl::ThreadedReader::readIntoBuffer().
| void RingBuffer::sumIntoBuffer | ( | Buffer & | inputBuffer | ) | throw (CException) |
Do an adding write of data into the ring buffer.
| void RingBuffer::destructiveNextBuffer | ( | Buffer & | outputBuffer | ) | throw (CException) |
| void RingBuffer::writeBuffer | ( | Buffer & | inputBuffer, | |
| unsigned | bufNum | |||
| ) | throw (CException) [virtual] |
| void RingBuffer::sumIntoBuffer | ( | Buffer & | inputBuffer, | |
| unsigned | bufNum | |||
| ) | throw (CException) |
friend class RingBufferTap [friend] |
Allow the RingBufferTap to access private members of this class.
| unsigned csl::RingBuffer::mCurrentWriteFrame |
state -- users can manipulate my internal tap and buffer
Referenced by csl::DelayLine::delayLength(), and csl::RingBufferTap::setOffset().
internal tap so a RingBuffer can also be a a UnitGenerator
Referenced by csl::DelayLine::delayLength(), csl::DelayLine::DelayLine(), RingBuffer(), csl::DelayLine::setDelayLength(), csl::DelayLine::setDelayTime(), setLoopEnd(), setLoopStart(), and testMultiTap().
unsigned csl::RingBuffer::mTempCurrentWriteFrame [protected] |
Used in next buffer to save state between calls in the same block.
1.5.8