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

ISender is a utility class which can be used to defer data from the realtime audio processing and send it to the GUI for visualization. More...

#include <ISender.h>

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

Public Member Functions

void PushData (const ISenderData< MAXNC, T > &d)
 Pushes a data element onto the queue. More...
 
virtual void PrepareDataForUI (ISenderData< MAXNC, T > &d)
 This is called on the main thread and can be used to transform the data, e.g. 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, overriding the tags in the data packet. More...
 

Static Public Attributes

static constexpr int kUpdateMessage = 0
 

Detailed Description

template<int MAXNC = 1, int QUEUE_SIZE = 64, typename T = float>
class ISender< MAXNC, QUEUE_SIZE, T >

ISender is a utility class which can be used to defer data from the realtime audio processing and send it to the GUI for visualization.

Definition at line 65 of file ISender.h.

Member Function Documentation

◆ PrepareDataForUI()

template<int MAXNC = 1, int QUEUE_SIZE = 64, typename T = float>
virtual void ISender< MAXNC, QUEUE_SIZE, T >::PrepareDataForUI ( ISenderData< MAXNC, T > &  d)
inlinevirtual

This is called on the main thread and can be used to transform the data, e.g.

take an FFT.

Definition at line 77 of file ISender.h.

Referenced by ISender< MAXNC, QUEUE_SIZE, T >::TransmitData().

◆ PushData()

template<int MAXNC = 1, int QUEUE_SIZE = 64, typename T = float>
void ISender< MAXNC, QUEUE_SIZE, T >::PushData ( const ISenderData< MAXNC, T > &  d)
inline

Pushes a data element onto the queue.

This can be called on the realtime audio thread.

Definition at line 71 of file ISender.h.

Referenced by IPeakSender< MAXNC, QUEUE_SIZE >::ProcessBlock(), IPeakAvgSender< MAXNC, QUEUE_SIZE >::ProcessBlock(), and IBufferSender< MAXNC, QUEUE_SIZE, MAXBUF >::ProcessBlock().

◆ TransmitData()

template<int MAXNC = 1, int QUEUE_SIZE = 64, typename T = float>
void ISender< MAXNC, QUEUE_SIZE, T >::TransmitData ( IEditorDelegate dlg)
inline

Pops elements off the queue and sends messages to controls.

This must be called on the main thread - typically in MyPlugin::OnIdle()

Definition at line 81 of file ISender.h.

References ISender< MAXNC, QUEUE_SIZE, T >::PrepareDataForUI(), and IEditorDelegate::SendControlMsgFromDelegate().

◆ TransmitDataToControlsWithTags()

template<int MAXNC = 1, int QUEUE_SIZE = 64, typename T = float>
void ISender< MAXNC, QUEUE_SIZE, T >::TransmitDataToControlsWithTags ( IEditorDelegate dlg,
const std::initializer_list< int > &  ctrlTags 
)
inline

This variation can be used if you need to supply multiple controls with the same ISenderData, overriding the tags in the data packet.

Parameters
dlgThe editor delegate
ctrlTagsA list of control tags that should receive the updates from this sender

Definition at line 96 of file ISender.h.

References IEditorDelegate::SendControlMsgFromDelegate().

Member Data Documentation

◆ kUpdateMessage

template<int MAXNC = 1, int QUEUE_SIZE = 64, typename T = float>
constexpr int ISender< MAXNC, QUEUE_SIZE, T >::kUpdateMessage = 0
staticconstexpr

Definition at line 68 of file ISender.h.


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