8 #ifndef CSL_SoundFileCA_H
9 #define CSL_SoundFileCA_H
12 #import <AudioToolbox/ExtendedAudioFile.h>
23 CASoundFile(
string path,
int start = -1,
int stop = -1,
bool load =
true);
35 unsigned rate = 44100,
SeekPosition
Enumeration for seek flags.
#define kSoundFileFormatAIFF
AudioFileID mSoundID
the CS audio file ID
AdditiveInstrument.h – Sum-of-sines synthesis instrument class.
void writeBuffer(Buffer &inputBuffer)
write a buffer of data into the file
void openForRead(bool load=true)
void initFromSndfile()
read SF header
CASoundFile(CFURLRef path, bool load=true)
CFURLRef mURL
the full URL of the file
bool mBigEndian
flag for endian-ness of sound file (varies byformat)
void readBufferFromFile(unsigned numFrames)
read a buffer from the file (possibly all of it)
SoundFileFormat format()
get format
unsigned seekTo(int position, SeekPosition whence)
seek to some position relative to "whence"
void close()
close file seek to some position
Buffer – the multi-channel sample buffer class (passed around between generators and IO guys)...
void dump()
log snd file props < open file and get stats; read it if "load"
void openForReadWrite()
open r/w
Here's the abstract sound file reader/writer class, a sample player UGen. The concrete subclasses rep...
unsigned channels() const
accessors
void openForWrite(SoundFileFormat format=kSoundFileFormatAIFF, unsigned channels=1, unsigned rate=44100, unsigned bitDepth=16)
Open a file for write. Default values are some common format.
Base class of CSL exceptions (written upper-case). Has a string message.