This struct encapsulates one frame of mono audio output. More...
#include <AudioOutput.h>
Public Member Functions | |
StereoOutput (AudioOutputStorage_t l, AudioOutputStorage_t r) | |
Construct an audio frame from raw values (zero-centered) | |
StereoOutput () | |
Default contstructor. | |
AudioOutput_t | portable () const __attribute__((deprecated("Sketch generates stereo output |
Conversion to int operator: If used in a mono config, returns only the left channel (and gives a compile time warning). More... | |
AudioOutputStorage_t | l () const |
AudioOutputStorage_t | r () const |
StereoOutput & | clip () |
Static Public Member Functions | |
template<typename T > | |
static StereoOutput | fromNBit (uint8_t bits, T l, T r) |
static StereoOutput | from8Bit (int16_t l, int16_t r) |
static StereoOutput | from16Bit (int16_t l, int16_t r) |
template<typename A , typename B > | |
static StereoOutput | fromAlmostNBit (A bits, B l, B r) |
Public Attributes | |
AudioOutput_t but Mozzi is configured for mono Check mozzi_config | h { return _l |
This struct encapsulates one frame of mono audio output.
Internally, it really just boils down to two int values, but the struct provides useful API an top of that. For more detail
Definition at line 89 of file AudioOutput.h.
|
inline |
Definition at line 103 of file AudioOutput.h.
|
inlinestatic |
Definition at line 110 of file AudioOutput.h.
|
inlinestatic |
Definition at line 108 of file AudioOutput.h.
|
inlinestatic |
Definition at line 112 of file AudioOutput.h.
|
inlinestatic |
Definition at line 106 of file AudioOutput.h.
|
inline |
Conversion to int operator: If used in a mono config, returns only the left channel (and gives a compile time warning).
This could be turned into an operator for implicit conversion in this case. For now we chose to apply conversion on demand, only, as most of the time using StereoOutput in a mono config, is not intended.