10 #ifndef CSL_RingBuffer_H
11 #define CSL_RingBuffer_H
37 void setLoopEnd(
unsigned frame) { mLoopEndFrame = frame; }
62 RingBuffer(
unsigned int nmChannels,
unsigned int nmFrames);
SeekPosition
Enumeration for seek flags.
unsigned mLoopEndFrame
Number of frames away from buffer end.
RingBuffer is the storage + a default reader.
unsigned mNumFrames
num frames used in each buffer
void setOffset(int offset)
AdditiveInstrument.h – Sum-of-sines synthesis instrument class.
Effect – mix-in for classes that have unit generators as inputs (like filters).
void setLoopEnd(unsigned frame)
void sumIntoBuffer(Buffer &inputBuffer)
Do an adding write of data into the ring buffer.
unsigned mTempCurrentWriteFrame
Used in next buffer to save state between calls in the same block.
unsigned mTempCurrentFrame
a little hack necessary to track info
RingBuffer()
Constructors.
void setLoopStart(unsigned frame)
void setBuffer(RingBuffer *parent)
RingBufferTap mTap
internal tap so a RingBuffer can also be a a UnitGenerator
BufferStream(Buffer &buffer)
void setLoopStart(unsigned frame)
These loop setters allow for variable buffer lengths by varying the points where the buffer writes...
unsigned mCurrentWriteFrame
Class to simplify writing into and playing back buffers. Think of this as a simple buffer that has a ...
void nextBuffer(Buffer &outputBuffer)
nextBuffer method
void writeBuffer(Buffer &inputBuffer)
Write a buffer of data into the ring buffer.
Scalable – mix-in class with scale and offset control inputs (may be constants or generators)...
unsigned mLoopStartFrame
Number of frames from the beginning to start a loop at.
void setLoopEnd(unsigned frame)
Calls the setLoopStart of it's tap.
RingBuffer * mParentBuffer
void writeBuffer(Buffer &inputBuffer)
Write a buffer of data into the ring buffer.
Writeable – a mix-in for buffers and streams that one can write to.
unsigned seekTo(int position, SeekPosition whence)
general-purpose seek on a stream
unsigned seekTo(int position)
void nextBuffer(Buffer &outputBuffer)
Calls the setLoopEnd of it's tap.
RingBufferTap is a reader that loops over a buffer.
void nextBuffer(Buffer &outputBuffer)
Read a buffer from the buffer stream.
unsigned seekTo(int position, SeekPosition whence)
general-purpose seek on a stream
void dump()
pretty-print the receiver
Buffer – the multi-channel sample buffer class (passed around between generators and IO guys)...
void destructiveNextBuffer(Buffer &outputBuffer)
zeroing as it goes.
RingBufferTap(RingBuffer *parent=0, int offset=0)
Create a tap on a ring buffer, optionally offset relative to the current write position.
void destructiveNextBuffer(Buffer &outputBuffer)
Read a buffer zeroing as you go.
void setBuffer(Buffer &buffer)
unsigned mTempCurrentFrame
Seekable – a mix-in for positionable streams.
unsigned mCurrentWriteFrame
state – users can manipulate my internal tap and buffer
Base class of CSL exceptions (written upper-case). Has a string message.
unsigned mTempCurrentWriteFrame
a little hack necessary to track info