Ardour  8.7-15-gadf511264b
AudioGrapher::SndfileReader< T > Class Template Reference

#include <sndfile_reader.h>

Inheritance diagram for AudioGrapher::SndfileReader< T >:
[legend]

Public Member Functions

 SndfileReader (std::string const &path)
 
virtual ~SndfileReader ()
 
 SndfileReader (SndfileReader const &other)
 
samplecnt_t read (ProcessContext< T > &context)
 
SndfileHandleoperator= (const SndfileHandle &rhs)
 
- Public Member Functions inherited from AudioGrapher::SndfileHandle
 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)
 
void close (void)
 
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)
 
- Public Member Functions inherited from AudioGrapher::ListedSource< DefaultSampleType >
void add_output (typename Source< DefaultSampleType >::SinkPtr output)
 
void clear_outputs ()
 Removes all outputs added. More...
 
void remove_output (typename Source< DefaultSampleType >::SinkPtr output)
 
- Public Member Functions inherited from AudioGrapher::Source< DefaultSampleType >
virtual ~Source ()
 
virtual void add_output (SinkPtr output)=0
 Adds an output to this source. All data generated is forwarded to output. More...
 
virtual void remove_output (SinkPtr output)=0
 Removes a specific output from this source. More...
 

Protected Member Functions

 SndfileReader ()
 SndfileHandle has to be constructed directly by deriving classes. More...
 
- Protected Member Functions inherited from AudioGrapher::SndfileBase
 SndfileBase ()
 
- Protected Member Functions inherited from AudioGrapher::ListedSource< DefaultSampleType >
void output (ProcessContext< DefaultSampleType > const &c)
 Helper for derived classes. More...
 
void output (ProcessContext< DefaultSampleType > &c)
 
bool output_size_is_one ()
 
- Protected Member Functions inherited from AudioGrapher::Throwing< L >
 Throwing ()
 
bool throw_level (ThrowLevel level)
 

Additional Inherited Members

- Public Types inherited from AudioGrapher::SndfileBase
enum  Mode { Read = SFM_READ , Write = SFM_WRITE , ReadWrite = SFM_RDWR }
 
- Public Types inherited from AudioGrapher::Source< DefaultSampleType >
typedef std::shared_ptr< Sink< DefaultSampleType > > SinkPtr
 
- Static Public Member Functions inherited from AudioGrapher::SndfileHandle
static int formatCheck (int format, int channels, int samplerate)
 
- Protected Types inherited from AudioGrapher::ListedSource< DefaultSampleType >
typedef std::list< typename Source< DefaultSampleType >::SinkPtrSinkList
 
- Protected Attributes inherited from AudioGrapher::ListedSource< DefaultSampleType >
SinkList outputs
 

Detailed Description

template<typename T = DefaultSampleType>
class AudioGrapher::SndfileReader< T >

Reader for audio files using libsndfile. Only short, int and float are valid template parameters

Definition at line 15 of file sndfile_reader.h.

Constructor & Destructor Documentation

◆ SndfileReader() [1/3]

template<typename T = DefaultSampleType>
AudioGrapher::SndfileReader< T >::SndfileReader ( std::string const &  path)
inline

Definition at line 22 of file sndfile_reader.h.

◆ ~SndfileReader()

template<typename T = DefaultSampleType>
virtual AudioGrapher::SndfileReader< T >::~SndfileReader ( )
inlinevirtual

Definition at line 23 of file sndfile_reader.h.

◆ SndfileReader() [2/3]

template<typename T = DefaultSampleType>
AudioGrapher::SndfileReader< T >::SndfileReader ( SndfileReader< T > const &  other)
inline

Definition at line 25 of file sndfile_reader.h.

◆ SndfileReader() [3/3]

template<typename T = DefaultSampleType>
AudioGrapher::SndfileReader< T >::SndfileReader ( )
inlineprotected

SndfileHandle has to be constructed directly by deriving classes.

Definition at line 52 of file sndfile_reader.h.

Member Function Documentation

◆ operator=()

template<typename T = DefaultSampleType>
SndfileHandle& AudioGrapher::SndfileHandle::operator=

◆ read()

template<typename T = DefaultSampleType>
samplecnt_t AudioGrapher::SndfileReader< T >::read ( ProcessContext< T > &  context)
inline

Read data into buffer in context, only the data is modified (not sample count) Note that the data read is output to the outputs, as well as read into the context

Returns
number of samples read

Definition at line 32 of file sndfile_reader.h.


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