YSE sound engine
1.0
cross platform sound engine
|
Public Member Functions | |
sample (UInt length=STANDARD_BUFFERSIZE) | |
sample (const AUDIOBUFFER &cp) | |
UInt | getLength () const |
UInt | getLengthMS () const |
Flt | getLengthSec () const |
Flt * | getBuffer () |
AUDIOBUFFER & | operator+= (Flt f) |
AUDIOBUFFER & | operator-= (Flt f) |
AUDIOBUFFER & | operator*= (Flt f) |
AUDIOBUFFER & | operator/= (Flt f) |
AUDIOBUFFER & | operator+= (const AUDIOBUFFER &s) |
AUDIOBUFFER & | operator-= (const AUDIOBUFFER &s) |
AUDIOBUFFER & | operator*= (const AUDIOBUFFER &s) |
AUDIOBUFFER & | operator/= (const AUDIOBUFFER &s) |
AUDIOBUFFER & | operator= (const AUDIOBUFFER &s) |
AUDIOBUFFER & | operator= (Flt f) |
AUDIOBUFFER & | copyFrom (const AUDIOBUFFER &s, UInt SourcePos, UInt DestPos, UInt length) |
sample & | drawLine (UInt start, UInt stop, Flt startValue, Flt stopValue) |
sample & | drawLine (UInt start, UInt stop, Flt value) |
Flt | getBack () |
AUDIOBUFFER & | resize (UInt length, Bool copy=false) |
Public Attributes | |
Flt * | cursor |
Definition at line 30 of file sample.hpp.
sample& YSE::DSP::sample::drawLine | ( | UInt | start, |
UInt | stop, | ||
Flt | startValue, | ||
Flt | stopValue | ||
) |
Draw data in a sound buffer.
This is not meant for buffers which will be sent to the audio output, but for buffers used to do calculations on real audio buffers. Make sure that start and stop values are within the bounds of this buffer (0 -> getLength()). If the startValue differs from the stopValue, values inbetween will be created as a linear slope.
start | the position in the buffer you want to start drawing |
stop | the position in the buffer you want to stop drawing |
startValue | the value you want to start with. (Between -1 and 1) |
stopValue | the value you want to stop at. (Between -1 and 1) |
sample& YSE::DSP::sample::drawLine | ( | UInt | start, |
UInt | stop, | ||
Flt | value | ||
) |
Fill (part of) a buffer with one value.
This is not meant for buffers which will be sent to the audio output, but for buffers used to do calculations on real audio buffers. Make sure that start and stop values are within the bounds of this buffer (0 -> getLength()). In a visual representation the result is an horizontal line.
start | the position in the buffer you want to start drawing |
stop | the position in the buffer you want to stop drawing |
value | the value to set. (Between -1 and 1) |