Ardour  9.0-pre0-582-g084a23a80d
AudioGrapher::DemoNoiseAdder Class Reference

Noise injector. More...

#include <demo_noise.h>

Inheritance diagram for AudioGrapher::DemoNoiseAdder:
[legend]

Public Member Functions

 DemoNoiseAdder (unsigned int channels)
 Constructor.
RT safe. More...
 
 ~DemoNoiseAdder ()
 
void init (samplecnt_t max_samples, samplecnt_t interval, samplecnt_t duration, float level)
 
void process (ProcessContext< float > const &ctx)
 
- Public Member Functions inherited from AudioGrapher::ListedSource< float >
void add_output (typename Source< float >::SinkPtr output)
 
void clear_outputs ()
 Removes all outputs added. More...
 
void remove_output (typename Source< float >::SinkPtr output)
 
- Public Member Functions inherited from AudioGrapher::Source< T >
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< float >
virtual ~Sink ()
 
virtual void process (ProcessContext< float > &context)
 

Private Member Functions

uint32_t randi ()
 
float randf ()
 

Private Attributes

float * _data_out
 
samplecnt_t _data_out_size
 
unsigned int _channels
 
samplecnt_t _interval
 
samplecnt_t _duration
 
float _level
 
samplecnt_t _pos
 
uint32_t _rseed
 

Additional Inherited Members

- Public Types inherited from AudioGrapher::Source< T >
typedef std::shared_ptr< Sink< T > > SinkPtr
 
- Protected Types inherited from AudioGrapher::ListedSource< float >
typedef std::list< typename Source< float >::SinkPtrSinkList
 
- Protected Member Functions inherited from AudioGrapher::ListedSource< float >
void output (ProcessContext< float > const &c)
 Helper for derived classes. More...
 
void output (ProcessContext< float > &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< float >
SinkList outputs
 

Detailed Description

Noise injector.

Definition at line 13 of file demo_noise.h.

Constructor & Destructor Documentation

◆ DemoNoiseAdder()

AudioGrapher::DemoNoiseAdder::DemoNoiseAdder ( unsigned int  channels)

Constructor.
RT safe.

◆ ~DemoNoiseAdder()

AudioGrapher::DemoNoiseAdder::~DemoNoiseAdder ( )

Member Function Documentation

◆ init()

void AudioGrapher::DemoNoiseAdder::init ( samplecnt_t  max_samples,
samplecnt_t  interval,
samplecnt_t  duration,
float  level 
)

◆ process()

void AudioGrapher::DemoNoiseAdder::process ( ProcessContext< float > const &  context)
virtual

Process given data. The data can not be modified, so in-place processing is not allowed. At least this function must be implemented by deriving classes

Implements AudioGrapher::Sink< float >.

◆ randf()

float AudioGrapher::DemoNoiseAdder::randf ( )
inlineprivate

Definition at line 40 of file demo_noise.h.

◆ randi()

uint32_t AudioGrapher::DemoNoiseAdder::randi ( )
private

Member Data Documentation

◆ _channels

unsigned int AudioGrapher::DemoNoiseAdder::_channels
private

Definition at line 32 of file demo_noise.h.

◆ _data_out

float* AudioGrapher::DemoNoiseAdder::_data_out
private

Definition at line 29 of file demo_noise.h.

◆ _data_out_size

samplecnt_t AudioGrapher::DemoNoiseAdder::_data_out_size
private

Definition at line 30 of file demo_noise.h.

◆ _duration

samplecnt_t AudioGrapher::DemoNoiseAdder::_duration
private

Definition at line 34 of file demo_noise.h.

◆ _interval

samplecnt_t AudioGrapher::DemoNoiseAdder::_interval
private

Definition at line 33 of file demo_noise.h.

◆ _level

float AudioGrapher::DemoNoiseAdder::_level
private

Definition at line 35 of file demo_noise.h.

◆ _pos

samplecnt_t AudioGrapher::DemoNoiseAdder::_pos
private

Definition at line 36 of file demo_noise.h.

◆ _rseed

uint32_t AudioGrapher::DemoNoiseAdder::_rseed
private

Definition at line 41 of file demo_noise.h.


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