Sound Byte Libs 0.5.1-121-g3358a44
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
sbl::control::Priority< N > Class Template Reference

The highest-priority active source wins. More...

Detailed Description

template<uint8_t N>
class sbl::control::Priority< N >

The highest-priority active source wins.

Source 0 is the highest priority. Each source reports a value and whether it is active (a MIDI source while its gate is high; a knob always). With no source active, the last resolved value holds.

Definition at line 38 of file merge.hpp.

#include <merge.hpp>

Public Member Functions

void set (uint8_t source, float value, bool active)
 
float value () const
 
int8_t winner () const
 Winning source index, or -1 if none is active (value() is holding).
 

Member Function Documentation

◆ set()

template<uint8_t N>
void sbl::control::Priority< N >::set ( uint8_t  source,
float  value,
bool  active 
)
inline

Definition at line 42 of file merge.hpp.

References sbl::control::Priority< N >::value().

◆ value()

template<uint8_t N>
float sbl::control::Priority< N >::value ( ) const
inline

Definition at line 49 of file merge.hpp.

Referenced by sbl::control::Priority< N >::set().

◆ winner()

template<uint8_t N>
int8_t sbl::control::Priority< N >::winner ( ) const
inline

Winning source index, or -1 if none is active (value() is holding).

Definition at line 52 of file merge.hpp.


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