 
    
   
Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   FAQ   Tutorial
   54   FileRead( std::string fileName, 
bool typeRaw = 
false, 
unsigned int nChannels = 1,
 
   67   void open( std::string fileName, 
bool typeRaw = 
false, 
unsigned int nChannels = 1,
 
   77   unsigned long fileSize( 
void )
 const { 
return fileSize_; };
 
   80   unsigned int channels( 
void )
 const { 
return channels_; };
 
   83   StkFormat 
format( 
void )
 const { 
return dataType_; };
 
   91   StkFloat 
fileRate( 
void )
 const { 
return fileRate_; };
 
  106   void read( 
StkFrames& buffer, 
unsigned long startFrame = 0, 
bool doNormalize = 
true );
 
  111   bool getRawInfo( 
const char *fileName, 
unsigned int nChannels,
 
  112                    StkFormat 
format, StkFloat rate );
 
  115   bool getWavInfo( 
const char *fileName );
 
  118   bool getSndInfo( 
const char *fileName );
 
  121   bool getAifInfo( 
const char *fileName );
 
  124   bool getMatInfo( 
const char *fileName );
 
  127   bool findNextMatArray( SINT32 *chunkSize, SINT32 *rows, SINT32 *columns, SINT32 *nametype );
 
  132   unsigned long fileSize_;
 
  133   unsigned long dataOffset_;
 
  134   unsigned int channels_;
 
  
StkFloat fileRate(void) const
Return the file sample rate in Hz.
Definition: FileRead.h:91
void read(StkFrames &buffer, unsigned long startFrame=0, bool doNormalize=true)
Read sample frames from the file into an StkFrames object.
STK audio file input class.
Definition: FileRead.h:42
void close(void)
If a file is open, close it.
FileRead(void)
Default constructor.
FileRead(std::string fileName, bool typeRaw=false, unsigned int nChannels=1, StkFormat format=STK_SINT16, StkFloat rate=22050.0)
Overloaded constructor that opens a file during instantiation.
An STK class to handle vectorized audio data.
Definition: Stk.h:276
static const StkFormat STK_SINT16
Definition: Stk.h:138
StkFormat format(void) const
Return the data format of the file.
Definition: FileRead.h:83
unsigned long fileSize(void) const
Return the file size in sample frames.
Definition: FileRead.h:77
The STK namespace.
Definition: ADSR.h:6
unsigned int channels(void) const
Return the number of audio channels in the file.
Definition: FileRead.h:80
bool isOpen(void)
Returns true if a file is currently open.
STK base class.
Definition: Stk.h:133
~FileRead(void)
Class destructor.
void open(std::string fileName, bool typeRaw=false, unsigned int nChannels=1, StkFormat format=STK_SINT16, StkFloat rate=22050.0)
Open the specified file and determine its formatting.