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

#include <process_context.h>

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

Public Types

enum  Flags { EndOfInput = 0 }
 
typedef FlagField::Flag Flag
 

Public Member Functions

 ProcessContext (T *data, samplecnt_t samples, ChannelCount channels)
 Basic constructor with data, sample and channel count. More...
 
 ProcessContext (ProcessContext< T > const &other)
 Normal copy constructor. More...
 
template<typename Y >
 ProcessContext (ProcessContext< Y > const &other, T *data, samplecnt_t samples, ChannelCount channels)
 "Copy constructor" with unique data, sample and channel count, but copies flags More...
 
template<typename Y >
 ProcessContext (ProcessContext< Y > const &other, T *data, samplecnt_t samples)
 "Copy constructor" with unique data and sample count, but copies channel count and flags More...
 
template<typename Y >
 ProcessContext (ProcessContext< Y > const &other, T *data)
 "Copy constructor" with unique data, but copies sample and channel count + flags More...
 
ProcessContext beginning (samplecnt_t samples)
 Make new Context out of the beginning of this context. More...
 
virtual ~ProcessContext ()
 
T const * data () const
 data points to the array of data to process More...
 
T * data ()
 
samplecnt_t const & samples () const
 samples tells how many samples the array pointed by data contains More...
 
ChannelCount const & channels () const
 
samplecnt_t samples_per_channel () const
 Returns the amount of samples per channel. More...
 
bool has_flag (Flag flag) const
 
void set_flag (Flag flag) const
 
void remove_flag (Flag flag) const
 
FlagField const & flags () const
 

Protected Attributes

T *const _data
 
samplecnt_t _samples
 
ChannelCount _channels
 
FlagField _flags
 

Private Member Functions

void validate_data ()
 

Static Private Attributes

static const ThrowLevel throwLevel = ThrowStrict
 

Additional Inherited Members

- Protected Member Functions inherited from AudioGrapher::Throwing< L >
 Throwing ()
 
bool throw_level (ThrowLevel level)
 

Detailed Description

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

Processing context. Constness only applies to data, not flags

Definition at line 23 of file process_context.h.

Member Typedef Documentation

◆ Flag

template<typename T = DefaultSampleType>
typedef FlagField::Flag AudioGrapher::ProcessContext< T >::Flag

Definition at line 34 of file process_context.h.

Member Enumeration Documentation

◆ Flags

template<typename T = DefaultSampleType>
enum AudioGrapher::ProcessContext::Flags
Enumerator
EndOfInput 

Definition at line 36 of file process_context.h.

Constructor & Destructor Documentation

◆ ProcessContext() [1/5]

template<typename T = DefaultSampleType>
AudioGrapher::ProcessContext< T >::ProcessContext ( T *  data,
samplecnt_t  samples,
ChannelCount  channels 
)
inline

Basic constructor with data, sample and channel count.

Definition at line 43 of file process_context.h.

◆ ProcessContext() [2/5]

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

Normal copy constructor.

Definition at line 48 of file process_context.h.

◆ ProcessContext() [3/5]

template<typename T = DefaultSampleType>
template<typename Y >
AudioGrapher::ProcessContext< T >::ProcessContext ( ProcessContext< Y > const &  other,
T *  data,
samplecnt_t  samples,
ChannelCount  channels 
)
inline

"Copy constructor" with unique data, sample and channel count, but copies flags

Definition at line 54 of file process_context.h.

◆ ProcessContext() [4/5]

template<typename T = DefaultSampleType>
template<typename Y >
AudioGrapher::ProcessContext< T >::ProcessContext ( ProcessContext< Y > const &  other,
T *  data,
samplecnt_t  samples 
)
inline

"Copy constructor" with unique data and sample count, but copies channel count and flags

Definition at line 60 of file process_context.h.

◆ ProcessContext() [5/5]

template<typename T = DefaultSampleType>
template<typename Y >
AudioGrapher::ProcessContext< T >::ProcessContext ( ProcessContext< Y > const &  other,
T *  data 
)
inline

"Copy constructor" with unique data, but copies sample and channel count + flags

Definition at line 66 of file process_context.h.

◆ ~ProcessContext()

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

Definition at line 81 of file process_context.h.

Member Function Documentation

◆ beginning()

template<typename T = DefaultSampleType>
ProcessContext AudioGrapher::ProcessContext< T >::beginning ( samplecnt_t  samples)
inline

Make new Context out of the beginning of this context.

Definition at line 71 of file process_context.h.

◆ channels()

template<typename T = DefaultSampleType>
ChannelCount const& AudioGrapher::ProcessContext< T >::channels ( ) const
inline

channels tells how many interleaved channels data contains If channels is greater than 1, each channel contains samples / channels samples of data

Definition at line 93 of file process_context.h.

◆ data() [1/2]

template<typename T = DefaultSampleType>
T* AudioGrapher::ProcessContext< T >::data ( )
inline

Definition at line 85 of file process_context.h.

◆ data() [2/2]

template<typename T = DefaultSampleType>
T const* AudioGrapher::ProcessContext< T >::data ( ) const
inline

data points to the array of data to process

Definition at line 84 of file process_context.h.

◆ flags()

template<typename T = DefaultSampleType>
FlagField const& AudioGrapher::ProcessContext< T >::flags ( ) const
inline

Definition at line 103 of file process_context.h.

◆ has_flag()

template<typename T = DefaultSampleType>
bool AudioGrapher::ProcessContext< T >::has_flag ( Flag  flag) const
inline

Definition at line 100 of file process_context.h.

◆ remove_flag()

template<typename T = DefaultSampleType>
void AudioGrapher::ProcessContext< T >::remove_flag ( Flag  flag) const
inline

Definition at line 102 of file process_context.h.

◆ samples()

template<typename T = DefaultSampleType>
samplecnt_t const& AudioGrapher::ProcessContext< T >::samples ( ) const
inline

samples tells how many samples the array pointed by data contains

Definition at line 88 of file process_context.h.

◆ samples_per_channel()

template<typename T = DefaultSampleType>
samplecnt_t AudioGrapher::ProcessContext< T >::samples_per_channel ( ) const
inline

Returns the amount of samples per channel.

Definition at line 96 of file process_context.h.

◆ set_flag()

template<typename T = DefaultSampleType>
void AudioGrapher::ProcessContext< T >::set_flag ( Flag  flag) const
inline

Definition at line 101 of file process_context.h.

◆ validate_data()

template<typename T = DefaultSampleType>
void AudioGrapher::ProcessContext< T >::validate_data ( )
inlineprivate

Definition at line 113 of file process_context.h.

Member Data Documentation

◆ _channels

template<typename T = DefaultSampleType>
ChannelCount AudioGrapher::ProcessContext< T >::_channels
protected

Definition at line 108 of file process_context.h.

◆ _data

template<typename T = DefaultSampleType>
T* const AudioGrapher::ProcessContext< T >::_data
protected

Definition at line 106 of file process_context.h.

◆ _flags

template<typename T = DefaultSampleType>
FlagField AudioGrapher::ProcessContext< T >::_flags
mutableprotected

Definition at line 110 of file process_context.h.

◆ _samples

template<typename T = DefaultSampleType>
samplecnt_t AudioGrapher::ProcessContext< T >::_samples
protected

Definition at line 107 of file process_context.h.

◆ throwLevel

template<typename T = DefaultSampleType>
const ThrowLevel AudioGrapher::ProcessContext< T >::throwLevel = ThrowStrict
staticprivate

Definition at line 28 of file process_context.h.


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