#include <SoundFileCA.h>

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) | |
| CASoundFile::CASoundFile | ( | CFURLRef | path | ) |
References CSL_NAME_LEN, and csl::Abst_SoundFile::mPath.
| 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 | ( | ) |
| SoundFileFormat CASoundFile::format | ( | ) | [virtual] |
| void CASoundFile::dump | ( | void | ) | [virtual] |
log snd file props
Reimplemented from csl::Abst_SoundFile.
References csl::Abst_SoundFile::channels(), csl::Abst_SoundFile::durationInSecs(), csl::UnitGenerator::frameRate(), csl::logMsg(), mBigEndian, and csl::Abst_SoundFile::path().
| void CASoundFile::openForRead | ( | ) | throw (CException) [virtual] |
open file and get stats Open a file for write. Default values are some common format.
Implements csl::Abst_SoundFile.
References initFromSndfile(), csl::kLogError, kSoundFileRead, csl::logMsg(), csl::CGestalt::maxSndFileFrames(), mBigEndian, csl::Abst_SoundFile::mBytesPerSample, csl::Seekable::mCurrentFrame, csl::UnitGenerator::mFrameRate, csl::Abst_SoundFile::mIsValid, csl::Abst_SoundFile::mMode, csl::UnitGenerator::mNumChannels, csl::Abst_SoundFile::mNumFrames, csl::Abst_SoundFile::mPath, mSoundID, csl::Abst_SoundFile::mStart, mURL, and readBufferFromFile().
| 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] |
seek to some position
Implements csl::Abst_SoundFile.
References csl::kPositionCurrent, csl::kPositionEnd, csl::kPositionStart, and csl::logMsg().
Referenced by initFromSndfile(), and readBufferFromFile().
| void CASoundFile::readBufferFromFile | ( | unsigned | numFrames | ) | [virtual] |
read a buffer from the file (possibly all of it)
Implements csl::Abst_SoundFile.
References csl::Abst_SoundFile::checkBuffer(), CONVERT_16_BIT, CONVERT_24_BIT, csl::Interleaver::deinterleave(), testkiss::j, csl::kPositionStart, mBigEndian, csl::Buffer::mBuffers, csl::Abst_SoundFile::mBytesPerSample, csl::Seekable::mCurrentFrame, csl::Abst_SoundFile::mIsLooping, csl::UnitGenerator::mNumChannels, csl::Buffer::monoBuffer(), csl::Abst_SoundFile::mPath, mSoundID, csl::Abst_SoundFile::mStop, csl::WavetableOscillator::mWavetable, and seekTo().
Referenced by openForRead().
| void CASoundFile::writeBuffer | ( | Buffer & | inputBuffer | ) | throw (CException) [virtual] |
| void CASoundFile::initFromSndfile | ( | ) | [protected, virtual] |
read SF header
Implements csl::Abst_SoundFile.
References csl::kPositionStart, csl::UnitGenerator::mFrameRate, csl::Abst_SoundFile::mIsValid, csl::Abst_SoundFile::mNumFrames, csl::Abst_SoundFile::mStart, csl::Abst_SoundFile::mStop, and seekTo().
Referenced by openForRead().
CFURLRef csl::CASoundFile::mURL [protected] |
AudioFileID csl::CASoundFile::mSoundID [protected] |
bool csl::CASoundFile::mBigEndian [protected] |
flag for endian-ness of sound file (varies byformat)
Referenced by dump(), openForRead(), and readBufferFromFile().
1.5.8