Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   FAQ   Tutorial


WvIn Class Reference

#include <WvIn.h>

Inheritance diagram for WvIn:

Stk FileWvIn InetWvIn RtWvIn WaveLoop List of all members.

Detailed Description

STK audio input abstract base class.

This class provides common functionality for a variety of audio data input subclasses.

WvIn supports multi-channel data. It is important to distinguish the tick() methods, which return samples produced by averaging across sample frames, from the tickFrame() methods, which return references or pointers to multi-channel sample frames.

Both interleaved and non-interleaved data is supported via the use of StkFrames objects.

by Perry R. Cook and Gary P. Scavone, 1995 - 2007.


Public Member Functions

 WvIn ()
 Default constructor.
virtual ~WvIn ()
 Class destructor.
unsigned int getChannels (void) const
 Return the number of audio channels in the data.
StkFloat lastOut (void) const
 Return the average across the last output sample frame.
const StkFrameslastFrame (void) const
 Return an StkFrames reference to the last output sample frame.
StkFloat tick (void)
 Read out the average across one sample frame of data.
StkFramestick (StkFrames &frames, unsigned int channel=0)
 Fill a channel of the StkFrames object with averaged sample frames.
StkFramestickFrame (StkFrames &frames)
 Fill the StkFrames argument with data and return the same reference.


Member Function Documentation

StkFloat WvIn::lastOut void   )  const
 

Return the average across the last output sample frame.

If no file data is loaded, the returned value is 0.0.

const StkFrames& WvIn::lastFrame void   )  const [inline]
 

Return an StkFrames reference to the last output sample frame.

If no file data is loaded, an empty container is returned.

StkFloat WvIn::tick void   ) 
 

Read out the average across one sample frame of data.

If no file data is loaded, the returned value is 0.0.

StkFrames& WvIn::tick StkFrames frames,
unsigned int  channel = 0
 

Fill a channel of the StkFrames object with averaged sample frames.

The channel argument should be zero or greater (the first channel is specified by 0). An StkError will be thrown if the channel argument is greater than or equal to the number of channels in the StkFrames object. If no file data is loaded, the container is filled with zeroes.

StkFrames& WvIn::tickFrame StkFrames frames  ) 
 

Fill the StkFrames argument with data and return the same reference.

An StkError will be thrown if there is an incompatability between the number of channels in the loaded data and that in the StkFrames argument. If no file data is loaded, the container is filled with zeroes.


The documentation for this class was generated from the following file:
The Synthesis ToolKit in C++ (STK)
©1995-2007 Perry R. Cook and Gary P. Scavone. All Rights Reserved.