csl::CASoundFile Class Reference

#include <SoundFileCA.h>

Inheritance diagram for csl::CASoundFile:

csl::Abst_SoundFile csl::WavetableOscillator csl::Writeable csl::Seekable csl::Oscillator csl::UnitGenerator csl::Phased csl::Scalable csl::Model csl::Controllable csl::Controllable

List of all members.

Public Member Functions

 CASoundFile (CFURLRef path)
 CASoundFile (string path, int start=-1, int stop=-1)
 CASoundFile (string folder, string path, int start=-1, int stop=-1)
 CASoundFile (CASoundFile &otherSndFile)
 Copy constructor -- shares sample buffer.
 ~CASoundFile ()
SoundFileFormat format ()
 get format
void dump ()
 log snd file props
void openForRead () throw (CException)
void openForWrite (SoundFileFormat format=kSoundFileFormatAIFF, unsigned channels=1, unsigned rate=44100, unsigned bitDepth=16) throw (CException)
 Open a file for write. Default values are some common format.
void openForReadWrite () throw (CException)
 open r/w
void close ()
unsigned seekTo (int position, SeekPosition whence) throw (CException)
 seek to some position
void readBufferFromFile (unsigned numFrames)
 read a buffer from the file (possibly all of it)
void writeBuffer (Buffer &inputBuffer) throw (CException)
 write a buffer of data into the file

Protected Member Functions

void initFromSndfile ()
 read SF header

Protected Attributes

CFURLRef mURL
 the full URL of the file
AudioFileID mSoundID
 the CS audio file ID
bool mBigEndian
 flag for endian-ness of sound file (varies byformat)


Detailed Description

CoreAudio sound file

Constructor & Destructor Documentation

CASoundFile::CASoundFile ( CFURLRef  path  ) 

CASoundFile::CASoundFile ( string  path,
int  start = -1,
int  stop = -1 
)

References mURL.

CASoundFile::CASoundFile ( string  folder,
string  path,
int  start = -1,
int  stop = -1 
)

CASoundFile::CASoundFile ( CASoundFile otherSndFile  ) 

Copy constructor -- shares sample buffer.

CASoundFile::~CASoundFile (  ) 


Member Function Documentation

SoundFileFormat CASoundFile::format (  )  [virtual]

get format

Implements csl::Abst_SoundFile.

References kSoundFileFormatAIFF.

void CASoundFile::dump ( void   )  [virtual]

void CASoundFile::openForRead (  )  throw (CException) [virtual]

void CASoundFile::openForWrite ( SoundFileFormat  format = kSoundFileFormatAIFF,
unsigned  channels = 1,
unsigned  rate = 44100,
unsigned  bitDepth = 16 
) throw (CException) [virtual]

Open a file for write. Default values are some common format.

Implements csl::Abst_SoundFile.

References csl::logMsg().

void csl::CASoundFile::openForReadWrite (  )  throw (CException)

open r/w

void CASoundFile::close (  )  [virtual]

close file seek to some position

Implements csl::Abst_SoundFile.

References csl::Abst_SoundFile::freeBuffer().

unsigned CASoundFile::seekTo ( int  position,
SeekPosition  whence 
) throw (CException) [virtual]

void CASoundFile::readBufferFromFile ( unsigned  numFrames  )  [virtual]

void CASoundFile::writeBuffer ( Buffer inputBuffer  )  throw (CException) [virtual]

write a buffer of data into the file

Implements csl::Abst_SoundFile.

References csl::logMsg().

void CASoundFile::initFromSndfile (  )  [protected, virtual]


Member Data Documentation

CFURLRef csl::CASoundFile::mURL [protected]

the full URL of the file

Referenced by CASoundFile(), and openForRead().

AudioFileID csl::CASoundFile::mSoundID [protected]

the CS audio file ID

Referenced by openForRead(), and readBufferFromFile().

bool csl::CASoundFile::mBigEndian [protected]

flag for endian-ness of sound file (varies byformat)

Referenced by dump(), openForRead(), and readBufferFromFile().


The documentation for this class was generated from the following files:

Generated on Thu Sep 17 23:14:17 2009 for CSL by  doxygen 1.5.8