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

A class that reads the maximum value from a stream. More...

#include <peak_reader.h>

Inheritance diagram for AudioGrapher::PeakReader:
[legend]

Public Member Functions

 PeakReader ()
 Constructor
RT safe. More...
 
float get_peak ()
 Returns the highest absolute of the values found so far.
RT safe. More...
 
void reset ()
 Resets the peak to 0
RT safe. More...
 
void process (ProcessContext< float > const &c)
 Finds peaks from the data
RT safe. More...
 
- 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 Attributes

float peak
 

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 Attributes inherited from AudioGrapher::ListedSource< float >
SinkList outputs
 

Detailed Description

A class that reads the maximum value from a stream.

Definition at line 13 of file peak_reader.h.

Constructor & Destructor Documentation

◆ PeakReader()

AudioGrapher::PeakReader::PeakReader ( )
inline

Constructor
RT safe.

Definition at line 17 of file peak_reader.h.

Member Function Documentation

◆ get_peak()

float AudioGrapher::PeakReader::get_peak ( )
inline

Returns the highest absolute of the values found so far.
RT safe.

Definition at line 20 of file peak_reader.h.

◆ process()

void AudioGrapher::PeakReader::process ( ProcessContext< float > const &  c)
inlinevirtual

Finds peaks from the data
RT safe.

Implements AudioGrapher::Sink< float >.

Definition at line 26 of file peak_reader.h.

◆ reset()

void AudioGrapher::PeakReader::reset ( )
inline

Resets the peak to 0
RT safe.

Definition at line 23 of file peak_reader.h.

Member Data Documentation

◆ peak

float AudioGrapher::PeakReader::peak
private

Definition at line 35 of file peak_reader.h.


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