csl::JSoundFile Class Reference

#include <SoundFileJ.h>

Inheritance diagram for csl::JSoundFile:

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

 JSoundFile (string path, int start=-1, int stop=-1)
 JSoundFile (string folder, string path, int start=-1, int stop=-1)
 JSoundFile (JSoundFile &otherSndFile)
 Copy constructor -- shares sample buffer.
 ~JSoundFile ()
unsigned duration () const
 number of frames in the sound file
SoundFileFormat format ()
 get format
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

Public Attributes

AudioFormatReader * mAFReader
 my reader
AudioFormatWriter * mAFWriter
 and my writer
File * mIOFile
 my JUCE file
FileOutputStream * mOutStream

Protected Member Functions

void initFromSndfile ()
 read SF header


Detailed Description

JUCE sound file

Constructor & Destructor Documentation

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

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

JSoundFile::JSoundFile ( JSoundFile otherSndFile  ) 

Copy constructor -- shares sample buffer.

JSoundFile::~JSoundFile (  ) 


Member Function Documentation

unsigned JSoundFile::duration (  )  const [virtual]

number of frames in the sound file

Reimplemented from csl::Abst_SoundFile.

References mAFReader.

SoundFileFormat JSoundFile::format (  )  [virtual]

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

void JSoundFile::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::kLogError, kSoundFileFormatAIFF, kSoundFileFormatWAV, kSoundFileWrite, and csl::logMsg().

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

open r/w

void JSoundFile::close (  )  [virtual]

close file seek to some position

Implements csl::Abst_SoundFile.

References csl::Abst_SoundFile::freeBuffer().

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

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

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

write a buffer of data into the file

Implements csl::Abst_SoundFile.

References csl::kLogError, and csl::logMsg().

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


Member Data Documentation

AudioFormatReader* csl::JSoundFile::mAFReader

AudioFormatWriter* csl::JSoundFile::mAFWriter

and my writer

my JUCE file

Referenced by openForRead().

FileOutputStream* csl::JSoundFile::mOutStream


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