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

Interleaves many streams of non-interleaved data into one interleaved stream. More...

#include <interleaver.h>

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

Classes

class  Input
 

Public Member Functions

 Interleaver ()
 Constructs an interleaver
RT safe. More...
 
 ~Interleaver ()
 
void init (unsigned int num_channels, samplecnt_t max_samples_per_channel)
 Inits the interleaver. Must be called before using.
Not RT safe. More...
 
Source< T >::SinkPtr input (unsigned int channel)
 
- 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...
 

Private Types

typedef std::shared_ptr< InputInputPtr
 

Private Member Functions

void reset ()
 
void reset_channels ()
 
void write_channel (ProcessContext< T > const &c, unsigned int channel)
 
samplecnt_t ready_to_output ()
 

Private Attributes

std::vector< InputPtrinputs
 
unsigned int channels
 
samplecnt_t max_samples
 
T * buffer
 

Additional Inherited Members

- Public Types inherited from AudioGrapher::Source< DefaultSampleType >
typedef std::shared_ptr< Sink< DefaultSampleType > > SinkPtr
 
- 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::Throwing< L >
 Throwing ()
 
bool throw_level (ThrowLevel level)
 
- Protected Attributes inherited from AudioGrapher::ListedSource< DefaultSampleType >
SinkList outputs
 

Detailed Description

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

Interleaves many streams of non-interleaved data into one interleaved stream.

Definition at line 19 of file interleaver.h.

Member Typedef Documentation

◆ InputPtr

template<typename T = DefaultSampleType>
typedef std::shared_ptr<Input> AudioGrapher::Interleaver< T >::InputPtr
private

Definition at line 143 of file interleaver.h.

Constructor & Destructor Documentation

◆ Interleaver()

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

Constructs an interleaver
RT safe.

Definition at line 26 of file interleaver.h.

◆ ~Interleaver()

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

Definition at line 32 of file interleaver.h.

Member Function Documentation

◆ init()

template<typename T = DefaultSampleType>
void AudioGrapher::Interleaver< T >::init ( unsigned int  num_channels,
samplecnt_t  max_samples_per_channel 
)
inline

Inits the interleaver. Must be called before using.
Not RT safe.

Definition at line 35 of file interleaver.h.

◆ input()

template<typename T = DefaultSampleType>
Source<T>::SinkPtr AudioGrapher::Interleaver< T >::input ( unsigned int  channel)
inline

Returns the input indexed by channel
RT safe
The process function of returned Sinks are also RT Safe

Definition at line 51 of file interleaver.h.

◆ ready_to_output()

template<typename T = DefaultSampleType>
samplecnt_t AudioGrapher::Interleaver< T >::ready_to_output ( )
inlineprivate

Definition at line 127 of file interleaver.h.

◆ reset()

template<typename T = DefaultSampleType>
void AudioGrapher::Interleaver< T >::reset ( )
inlineprivate

Definition at line 91 of file interleaver.h.

◆ reset_channels()

template<typename T = DefaultSampleType>
void AudioGrapher::Interleaver< T >::reset_channels ( )
inlineprivate

Definition at line 100 of file interleaver.h.

◆ write_channel()

template<typename T = DefaultSampleType>
void AudioGrapher::Interleaver< T >::write_channel ( ProcessContext< T > const &  c,
unsigned int  channel 
)
inlineprivate

Definition at line 108 of file interleaver.h.

Member Data Documentation

◆ buffer

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

Definition at line 148 of file interleaver.h.

◆ channels

template<typename T = DefaultSampleType>
unsigned int AudioGrapher::Interleaver< T >::channels
private

Definition at line 146 of file interleaver.h.

◆ inputs

template<typename T = DefaultSampleType>
std::vector<InputPtr> AudioGrapher::Interleaver< T >::inputs
private

Definition at line 144 of file interleaver.h.

◆ max_samples

template<typename T = DefaultSampleType>
samplecnt_t AudioGrapher::Interleaver< T >::max_samples
private

Definition at line 147 of file interleaver.h.


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