27 WvOut(
void ) : frameCounter_(0), clipping_(false) {};
45 virtual void tick(
const StkFloat sample ) = 0;
53 StkFloat& clipTest( StkFloat& sample );
56 unsigned long frameCounter_;
61 inline StkFloat& WvOut :: clipTest( StkFloat& sample )
68 else if ( sample < -1.0 ) {
73 if ( clip ==
true && clipping_ ==
false ) {
76 handleError(
"WvOut: data value(s) outside +-1.0 detected ... clamping at outer bound!", StkError::WARNING );
An STK class to handle vectorized audio data.
Definition: Stk.h:287
STK base class.
Definition: Stk.h:144
static void handleError(const char *message, StkError::Type type)
Static function for error reporting and handling using c-strings.
static StkFloat sampleRate(void)
Static method that returns the current STK sample rate.
Definition: Stk.h:156
STK audio output abstract base class.
Definition: WvOut.h:23
StkFloat getTime(void) const
Return the number of seconds of data output.
Definition: WvOut.h:33
WvOut(void)
Default constructor.
Definition: WvOut.h:27
void resetClipStatus(void)
Reset the clipping status to false.
Definition: WvOut.h:39
virtual void tick(const StkFrames &frames)=0
Output the StkFrames data.
virtual void tick(const StkFloat sample)=0
Output a single sample to all channels in a sample frame.
bool clipStatus(void)
Returns true if clipping has been detected during output since instantiation or the last reset.
Definition: WvOut.h:36
unsigned long getFrameCount(void) const
Return the number of sample frames output.
Definition: WvOut.h:30
The STK namespace.
Definition: ADSR.h:8