 
    
   
Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   FAQ   Tutorial
   56   FileWvIn( 
unsigned long chunkThreshold = 1000000, 
unsigned long chunkSize = 1024 );
 
   63   FileWvIn( std::string fileName, 
bool raw = 
false, 
bool doNormalize = 
true,
 
   64             unsigned long chunkThreshold = 1000000, 
unsigned long chunkSize = 1024,
 
   65             bool doInt2FloatScaling = 
true );
 
   81   virtual void openFile( std::string fileName, 
bool raw = 
false, 
bool doNormalize = 
true, 
bool doInt2FloatScaling = 
true );
 
  104   virtual unsigned long getSize( 
void )
 const { 
return fileSize_; };
 
  151   StkFloat 
lastOut( 
unsigned int channel = 0 );
 
  163   virtual StkFloat 
tick( 
unsigned int channel = 0 );
 
  177   void sampleRateChanged( StkFloat newRate, StkFloat oldRate );
 
  182   bool int2floatscaling_;
 
  186   unsigned long fileSize_;
 
  187   unsigned long chunkThreshold_;
 
  188   unsigned long chunkSize_;
 
  195 #if defined(_STK_DEBUG_) 
  196   if ( channel >= data_.
channels() ) {
 
  197     oStream_ << 
"FileWvIn::lastOut(): channel argument and soundfile data are incompatible!";
 
  202   if ( finished_ ) 
return 0.0;
 
  203   return lastFrame_[channel];
 
  
virtual void addTime(StkFloat time)
Increment the read pointer by time samples.
virtual unsigned long getSize(void) const
Return the file size in sample frames.
Definition: FileWvIn.h:104
virtual void openFile(std::string fileName, bool raw=false, bool doNormalize=true, bool doInt2FloatScaling=true)
Open the specified file and load its data.
virtual void normalize(void)
Normalize data to a maximum of +-1.0.
virtual StkFloat getFileRate(void) const
Return the input file sample rate in Hz (not the data read rate).
Definition: FileWvIn.h:112
virtual StkFrames & tick(StkFrames &frames, unsigned int channel=0)
Fill the StkFrames object with computed sample frames, starting at the specified channel and return t...
FileWvIn(unsigned long chunkThreshold=1000000, unsigned long chunkSize=1024)
Default constructor.
STK audio file input class.
Definition: FileWvIn.h:53
FileWvIn(std::string fileName, bool raw=false, bool doNormalize=true, unsigned long chunkThreshold=1000000, unsigned long chunkSize=1024, bool doInt2FloatScaling=true)
Overloaded constructor for file input.
STK audio file input class.
Definition: FileRead.h:42
StkFloat lastOut(unsigned int channel=0)
Return the specified channel value of the last computed frame.
Definition: FileWvIn.h:193
An STK class to handle vectorized audio data.
Definition: Stk.h:276
bool isFinished(void) const
Query whether reading is complete.
Definition: FileWvIn.h:118
void setInterpolate(bool doInterpolate)
Turn linear interpolation on/off.
Definition: FileWvIn.h:139
virtual void normalize(StkFloat peak)
Normalize data to a maximum of +-peak.
unsigned int channels(void) const
Return the number of channels represented by the data.
Definition: Stk.h:404
static void handleError(const char *message, StkError::Type type)
Static function for error reporting and handling using c-strings.
virtual void setRate(StkFloat rate)
Set the data read rate in samples. The rate can be negative.
virtual void closeFile(void)
Close a file if one is open.
StkFloat dataRate(void) const
Return the sample rate associated with the StkFrames data.
Definition: Stk.h:421
~FileWvIn(void)
Class destructor.
virtual void reset(void)
Clear outputs and reset time (file) pointer to zero.
The STK namespace.
Definition: ADSR.h:6
virtual StkFloat tick(unsigned int channel=0)
Compute a sample frame and return the specified channel value.
STK audio input abstract base class.
Definition: WvIn.h:20
bool isOpen(void)
Returns true if a file is currently open.
bool isOpen(void)
Query whether a file is open.
Definition: FileWvIn.h:115