Pd++  0.01
A pure C++ implementation of Pure Data objects
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
WvIn.h
1 #ifndef STK_WVIN_H
2 #define STK_WVIN_H
3 
4 #include "Stk.h"
5 
6 namespace stk {
7 
8 /***************************************************/
9 /*! \class WvIn
10  \brief STK audio input abstract base class.
11 
12  This class provides common functionality for a variety of audio
13  data input subclasses.
14 
15  by Perry R. Cook and Gary P. Scavone, 1995--2014.
16 */
17 /***************************************************/
18 
19 class WvIn : public Stk
20 {
21 public:
22  //! Return the number of audio channels in the data or stream.
23  unsigned int channelsOut( void ) const { return data_.channels(); };
24 
25  //! Return an StkFrames reference to the last computed sample frame.
26  /*!
27  If no file data is loaded, an empty container is returned.
28  */
29  const StkFrames& lastFrame( void ) const { return lastFrame_; };
30 
31  //! Compute one sample frame and return the specified \c channel value.
32  virtual StkFloat tick( unsigned int channel = 0 ) = 0;
33 
34  //! Fill the StkFrames argument with computed frames and return the same reference.
35  virtual StkFrames& tick( StkFrames& frames ) = 0;
36 
37 protected:
38 
39  StkFrames data_;
40  StkFrames lastFrame_;
41 
42 };
43 
44 } // stk namespace
45 
46 #endif
const StkFrames & lastFrame(void) const
Return an StkFrames reference to the last computed sample frame.
Definition: WvIn.h:29
The STK namespace.
Definition: FileRead.cpp:41
unsigned int channelsOut(void) const
Return the number of audio channels in the data or stream.
Definition: WvIn.h:23
An STK class to handle vectorized audio data.
Definition: Stk.h:272
STK audio input abstract base class.
Definition: WvIn.h:19
unsigned int channels(void) const
Return the number of channels represented by the data.
Definition: Stk.h:377
STK base class.
Definition: Stk.h:132
virtual StkFloat tick(unsigned int channel=0)=0
Compute one sample frame and return the specified channel value.