Ardour  9.0-pre0-582-g084a23a80d
AudioGrapher::SndfileWriter< T > Class Template Reference

#include <sndfile_writer.h>

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

Public Member Functions

 SndfileWriter (std::string const &path, int format, ChannelCount channels, samplecnt_t samplerate, std::shared_ptr< BroadcastInfo > broadcast_info)
 
virtual ~SndfileWriter ()
 
samplecnt_t get_samples_written () const
 
void reset_samples_written_count ()
 
virtual void process (ProcessContext< T > const &c)
 Writes data to file. More...
 
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::Sink< DefaultSampleType >
virtual ~Sink ()
 
virtual void process (ProcessContext< DefaultSampleType > const &context)=0
 
virtual void process (ProcessContext< DefaultSampleType > &context)
 

Public Attributes

PBD::Signal< void(std::string)> FileWritten
 

Protected Member Functions

 SndfileWriter ()
 SndfileHandle has to be constructed directly by deriving classes. More...
 
virtual void init ()
 
- Protected Member Functions inherited from AudioGrapher::SndfileBase
 SndfileBase ()
 
- Protected Member Functions inherited from AudioGrapher::Throwing< L >
 Throwing ()
 
bool throw_level (ThrowLevel level)
 
- Protected Member Functions inherited from AudioGrapher::FlagDebuggable< L >
void add_supported_flag (Flag flag)
 Adds a flag to the set of flags supported. More...
 
template<typename SelfType , typename ContextType >
void check_flags (SelfType &self, ProcessContext< ContextType > context)
 Prints debug output if context contains flags that are not supported by this class. More...
 
- Protected Member Functions inherited from AudioGrapher::Debuggable< DebugNone >
 Debuggable (std::ostream &debug_stream=std::cerr)
 
bool debug_level (DebugLevel level)
 
std::ostream & debug_stream ()
 

Protected Attributes

std::string path
 
samplecnt_t samples_written
 

Private Member Functions

 SndfileWriter (SndfileWriter const &other)
 

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::FlagDebuggable< L >
typedef FlagField::Flag Flag
 
- Static Public Member Functions inherited from AudioGrapher::SndfileHandle
static int formatCheck (int format, int channels, int samplerate)
 

Detailed Description

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

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

Definition at line 22 of file sndfile_writer.h.

Constructor & Destructor Documentation

◆ SndfileWriter() [1/3]

template<typename T = DefaultSampleType>
AudioGrapher::SndfileWriter< T >::SndfileWriter ( std::string const &  path,
int  format,
ChannelCount  channels,
samplecnt_t  samplerate,
std::shared_ptr< BroadcastInfo broadcast_info 
)
inline

Definition at line 29 of file sndfile_writer.h.

◆ ~SndfileWriter()

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

Definition at line 40 of file sndfile_writer.h.

◆ SndfileWriter() [2/3]

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

SndfileHandle has to be constructed directly by deriving classes.

Definition at line 82 of file sndfile_writer.h.

◆ SndfileWriter() [3/3]

template<typename T = DefaultSampleType>
AudioGrapher::SndfileWriter< T >::SndfileWriter ( SndfileWriter< T > const &  other)
inlineprivate

Definition at line 106 of file sndfile_writer.h.

Member Function Documentation

◆ get_samples_written()

template<typename T = DefaultSampleType>
samplecnt_t AudioGrapher::SndfileWriter< T >::get_samples_written ( ) const
inline

Definition at line 44 of file sndfile_writer.h.

◆ init()

template<typename T = DefaultSampleType>
virtual void AudioGrapher::SndfileWriter< T >::init ( )
inlineprotectedvirtual

Reimplemented in AudioGrapher::TmpFileRt< T >.

Definition at line 87 of file sndfile_writer.h.

◆ operator=()

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

◆ process()

template<typename T = DefaultSampleType>
virtual void AudioGrapher::SndfileWriter< T >::process ( ProcessContext< T > const &  c)
inlinevirtual

Writes data to file.

Definition at line 48 of file sndfile_writer.h.

◆ reset_samples_written_count()

template<typename T = DefaultSampleType>
void AudioGrapher::SndfileWriter< T >::reset_samples_written_count ( )
inline

Definition at line 45 of file sndfile_writer.h.

Member Data Documentation

◆ FileWritten

template<typename T = DefaultSampleType>
PBD::Signal<void(std::string)> AudioGrapher::SndfileWriter< T >::FileWritten

Definition at line 78 of file sndfile_writer.h.

◆ path

template<typename T = DefaultSampleType>
std::string AudioGrapher::SndfileWriter< T >::path
protected

Definition at line 102 of file sndfile_writer.h.

◆ samples_written

template<typename T = DefaultSampleType>
samplecnt_t AudioGrapher::SndfileWriter< T >::samples_written
protected

Definition at line 103 of file sndfile_writer.h.


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