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

A class that chunks process cycles into equal sized samples. More...

#include <chunker.h>

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

Public Member Functions

 Chunker (samplecnt_t chunk_size)
 
 ~Chunker ()
 
void process (ProcessContext< T > const &context)
 
- 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...
 
- Public Member Functions inherited from AudioGrapher::Sink< DefaultSampleType >
virtual ~Sink ()
 
virtual void process (ProcessContext< DefaultSampleType > const &context)=0
 
virtual void process (ProcessContext< DefaultSampleType > &context)
 

Private Attributes

samplecnt_t chunk_size
 
samplecnt_t position
 
T * buffer
 

Additional Inherited Members

- Public Types inherited from AudioGrapher::Source< DefaultSampleType >
typedef std::shared_ptr< Sink< DefaultSampleType > > SinkPtr
 
- Public Types inherited from AudioGrapher::FlagDebuggable< L >
typedef FlagField::Flag Flag
 
- Protected Types inherited from AudioGrapher::ListedSource< DefaultSampleType >
typedef std::list< typename Source< DefaultSampleType >::SinkPtrSinkList
 
- 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::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 inherited from AudioGrapher::ListedSource< DefaultSampleType >
SinkList outputs
 

Detailed Description

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

A class that chunks process cycles into equal sized samples.

Definition at line 15 of file chunker.h.

Constructor & Destructor Documentation

◆ Chunker()

template<typename T = DefaultSampleType>
AudioGrapher::Chunker< T >::Chunker ( samplecnt_t  chunk_size)
inline

Constructs a new Chunker with a constant chunk size.
NOT RT safe

Definition at line 24 of file chunker.h.

◆ ~Chunker()

template<typename T = DefaultSampleType>
AudioGrapher::Chunker< T >::~Chunker ( )
inline

Definition at line 32 of file chunker.h.

Member Function Documentation

◆ process()

template<typename T = DefaultSampleType>
void AudioGrapher::Chunker< T >::process ( ProcessContext< T > const &  context)
inline

Outputs data in context in chunks with the size specified in the constructor. Note that some calls might not produce any output, while others may produce several.
RT safe

Definition at line 41 of file chunker.h.

Member Data Documentation

◆ buffer

template<typename T = DefaultSampleType>
T* AudioGrapher::Chunker< T >::buffer
private

Definition at line 80 of file chunker.h.

◆ chunk_size

template<typename T = DefaultSampleType>
samplecnt_t AudioGrapher::Chunker< T >::chunk_size
private

Definition at line 78 of file chunker.h.

◆ position

template<typename T = DefaultSampleType>
samplecnt_t AudioGrapher::Chunker< T >::position
private

Definition at line 79 of file chunker.h.


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