iPlug2 - C++ Audio Plug-in Framework
Loading...
Searching...
No Matches
Public Member Functions | List of all members
IPeakSender< MAXNC, QUEUE_SIZE > Class Template Reference

IPeakSender is a utility class which can be used to defer peak data from sample buffers for sending to the GUI It sends the average peak value over a certain time window. More...

#include <ISender.h>

Inheritance diagram for IPeakSender< MAXNC, QUEUE_SIZE >:
[legend]

Public Member Functions

 IPeakSender (double minThresholdDb=-90., float windowSizeMs=5.0f)
 
void Reset (double sampleRate)
 
void SetWindowSizeMs (double timeMs, double sampleRate)
 
void ProcessBlock (sample **inputs, int nFrames, int ctrlTag=kNoTag, int nChans=MAXNC, int chanOffset=0)
 Queue peaks from sample buffers into the sender This can be called on the realtime audio thread. More...
 
- Public Member Functions inherited from ISender< MAXNC, QUEUE_SIZE, T >
void PushData (const ISenderData< MAXNC, T > &d)
 Pushes a data element onto the queue. More...
 
void TransmitData (IEditorDelegate &dlg)
 Pops elements off the queue and sends messages to controls. More...
 
void TransmitDataToControlsWithTags (IEditorDelegate &dlg, const std::initializer_list< int > &ctrlTags)
 This variation can be used if you need to supply multiple controls with the same ISenderData, overrideing the tags in the data packet. More...
 

Additional Inherited Members

- Static Public Attributes inherited from ISender< MAXNC, QUEUE_SIZE, T >
static constexpr int kUpdateMessage = 0
 

Detailed Description

template<int MAXNC = 1, int QUEUE_SIZE = 64>
class IPeakSender< MAXNC, QUEUE_SIZE >

IPeakSender is a utility class which can be used to defer peak data from sample buffers for sending to the GUI It sends the average peak value over a certain time window.

Definition at line 114 of file ISender.h.

Constructor & Destructor Documentation

◆ IPeakSender()

template<int MAXNC = 1, int QUEUE_SIZE = 64>
IPeakSender< MAXNC, QUEUE_SIZE >::IPeakSender ( double  minThresholdDb = -90.,
float  windowSizeMs = 5.0f 
)
inline

Definition at line 117 of file ISender.h.

Member Function Documentation

◆ ProcessBlock()

template<int MAXNC = 1, int QUEUE_SIZE = 64>
void IPeakSender< MAXNC, QUEUE_SIZE >::ProcessBlock ( sample **  inputs,
int  nFrames,
int  ctrlTag = kNoTag,
int  nChans = MAXNC,
int  chanOffset = 0 
)
inline

Queue peaks from sample buffers into the sender This can be called on the realtime audio thread.

Parameters
inputsthe sample buffers to analyze
nFramesthe number of sample frames in the input buffers
ctrlTaga control tag to indicate which control to send the buffers to. Note: if you don't supply the control tag here, you must use TransmitDataToControlsWithTags() and specify one or more tags there
nChansthe number of channels of data that should be sent
chanOffsetthe starting channel

Definition at line 142 of file ISender.h.

References ISender< MAXNC, QUEUE_SIZE, T >::PushData().

◆ Reset()

template<int MAXNC = 1, int QUEUE_SIZE = 64>
void IPeakSender< MAXNC, QUEUE_SIZE >::Reset ( double  sampleRate)
inline

Definition at line 124 of file ISender.h.

◆ SetWindowSizeMs()

template<int MAXNC = 1, int QUEUE_SIZE = 64>
void IPeakSender< MAXNC, QUEUE_SIZE >::SetWindowSizeMs ( double  timeMs,
double  sampleRate 
)
inline

Definition at line 130 of file ISender.h.


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