SAL
A C++ library for spatial audio.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Member Functions | Static Public Member Functions | List of all members
SndfileHandle Class Reference

#include <sndfile.hh>

Public Member Functions

 SndfileHandle (void)
 
 SndfileHandle (const char *path, int mode=SFM_READ, int format=0, int channels=0, int samplerate=0)
 
 SndfileHandle (std::string const &path, int mode=SFM_READ, int format=0, int channels=0, int samplerate=0)
 
 SndfileHandle (int fd, bool close_desc, int mode=SFM_READ, int format=0, int channels=0, int samplerate=0)
 
 ~SndfileHandle (void)
 
 SndfileHandle (const SndfileHandle &orig)
 
SndfileHandleoperator= (const SndfileHandle &rhs)
 
int refCount (void) const
 
 operator bool () const
 
bool operator== (const SndfileHandle &rhs) const
 
sf_count_t frames (void) const
 
int format (void) const
 
int channels (void) const
 
int samplerate (void) const
 
int error (void) const
 
const char * strError (void) const
 
int command (int cmd, void *data, int datasize)
 
sf_count_t seek (sf_count_t frames, int whence)
 
void writeSync (void)
 
int setString (int str_type, const char *str)
 
const char * getString (int str_type) const
 
sf_count_t read (short *ptr, sf_count_t items)
 
sf_count_t read (int *ptr, sf_count_t items)
 
sf_count_t read (float *ptr, sf_count_t items)
 
sf_count_t read (double *ptr, sf_count_t items)
 
sf_count_t write (const short *ptr, sf_count_t items)
 
sf_count_t write (const int *ptr, sf_count_t items)
 
sf_count_t write (const float *ptr, sf_count_t items)
 
sf_count_t write (const double *ptr, sf_count_t items)
 
sf_count_t readf (short *ptr, sf_count_t frames)
 
sf_count_t readf (int *ptr, sf_count_t frames)
 
sf_count_t readf (float *ptr, sf_count_t frames)
 
sf_count_t readf (double *ptr, sf_count_t frames)
 
sf_count_t writef (const short *ptr, sf_count_t frames)
 
sf_count_t writef (const int *ptr, sf_count_t frames)
 
sf_count_t writef (const float *ptr, sf_count_t frames)
 
sf_count_t writef (const double *ptr, sf_count_t frames)
 
sf_count_t readRaw (void *ptr, sf_count_t bytes)
 
sf_count_t writeRaw (const void *ptr, sf_count_t bytes)
 
SNDFILErawHandle (void)
 
SNDFILEtakeOwnership (void)
 

Static Public Member Functions

static int formatCheck (int format, int channels, int samplerate)
 

Constructor & Destructor Documentation

SndfileHandle::SndfileHandle ( void  )
inline
SndfileHandle::SndfileHandle ( const char *  path,
int  mode = SFM_READ,
int  format = 0,
int  channels = 0,
int  samplerate = 0 
)
inline
SndfileHandle::SndfileHandle ( std::string const &  path,
int  mode = SFM_READ,
int  format = 0,
int  channels = 0,
int  samplerate = 0 
)
inline
SndfileHandle::SndfileHandle ( int  fd,
bool  close_desc,
int  mode = SFM_READ,
int  format = 0,
int  channels = 0,
int  samplerate = 0 
)
inline
SndfileHandle::~SndfileHandle ( void  )
inline
SndfileHandle::SndfileHandle ( const SndfileHandle orig)
inline

Member Function Documentation

int SndfileHandle::channels ( void  ) const
inline
int SndfileHandle::command ( int  cmd,
void *  data,
int  datasize 
)
inline
int SndfileHandle::error ( void  ) const
inline
int SndfileHandle::format ( void  ) const
inline
int SndfileHandle::formatCheck ( int  format,
int  channels,
int  samplerate 
)
inlinestatic
sf_count_t SndfileHandle::frames ( void  ) const
inline
const char * SndfileHandle::getString ( int  str_type) const
inline
SndfileHandle::operator bool ( ) const
inline
SndfileHandle & SndfileHandle::operator= ( const SndfileHandle rhs)
inline
bool SndfileHandle::operator== ( const SndfileHandle rhs) const
inline
SNDFILE * SndfileHandle::rawHandle ( void  )
inline

Take ownership of handle, iff reference count is 1.

sf_count_t SndfileHandle::read ( short *  ptr,
sf_count_t  items 
)
inline
sf_count_t SndfileHandle::read ( int *  ptr,
sf_count_t  items 
)
inline
sf_count_t SndfileHandle::read ( float *  ptr,
sf_count_t  items 
)
inline
sf_count_t SndfileHandle::read ( double *  ptr,
sf_count_t  items 
)
inline
sf_count_t SndfileHandle::readf ( short *  ptr,
sf_count_t  frames 
)
inline
sf_count_t SndfileHandle::readf ( int *  ptr,
sf_count_t  frames 
)
inline
sf_count_t SndfileHandle::readf ( float *  ptr,
sf_count_t  frames 
)
inline
sf_count_t SndfileHandle::readf ( double *  ptr,
sf_count_t  frames 
)
inline
sf_count_t SndfileHandle::readRaw ( void *  ptr,
sf_count_t  bytes 
)
inline
int SndfileHandle::refCount ( void  ) const
inline
int SndfileHandle::samplerate ( void  ) const
inline
sf_count_t SndfileHandle::seek ( sf_count_t  frames,
int  whence 
)
inline
int SndfileHandle::setString ( int  str_type,
const char *  str 
)
inline
const char * SndfileHandle::strError ( void  ) const
inline
SNDFILE * SndfileHandle::takeOwnership ( void  )
inline
sf_count_t SndfileHandle::write ( const short *  ptr,
sf_count_t  items 
)
inline
sf_count_t SndfileHandle::write ( const int *  ptr,
sf_count_t  items 
)
inline
sf_count_t SndfileHandle::write ( const float *  ptr,
sf_count_t  items 
)
inline
sf_count_t SndfileHandle::write ( const double *  ptr,
sf_count_t  items 
)
inline
sf_count_t SndfileHandle::writef ( const short *  ptr,
sf_count_t  frames 
)
inline
sf_count_t SndfileHandle::writef ( const int *  ptr,
sf_count_t  frames 
)
inline
sf_count_t SndfileHandle::writef ( const float *  ptr,
sf_count_t  frames 
)
inline
sf_count_t SndfileHandle::writef ( const double *  ptr,
sf_count_t  frames 
)
inline
sf_count_t SndfileHandle::writeRaw ( const void *  ptr,
sf_count_t  bytes 
)
inline

Raw access to the handle. SndfileHandle keeps ownership.

void SndfileHandle::writeSync ( void  )
inline

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