| Mozzi version v1.1.0 sound synthesis library for Arduino |

Public Member Functions | Static Public Member Functions | List of all members
StereoOutput Struct Reference

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.
AudioOutputStorage_t | l () const
AudioOutputStorage_t | r () const
StereoOutput & | clip ()

## Static Public Member Functions
static StereoOutput | fromNBit (uint8_t bits, int16_t l, int16_t r)
static StereoOutput | fromNBit (uint8_t bits, int32_t l, int32_t r)
static StereoOutput | from8Bit (int16_t l, int16_t r)
static StereoOutput | from16Bit (int16_t l, int16_t r)
static StereoOutput | fromAlmostNBit (uint8_t bits, int16_t l, int16_t r)
static StereoOutput | fromAlmostNBit (uint8_t bits, int32_t l, int32_t r)

## Detailed Description

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

See also
  MonoOutput .

Definition at line 85 of file AudioOutput.h.

## Member Function Documentation

## ◆ clip()

StereoOutput& StereoOutput::clip | ( |  | ) |
| inline

See also
  MonoOutput::clip(). Clips both channels.

Definition at line 97 of file AudioOutput.h.

## ◆ from16Bit()

static StereoOutput StereoOutput::from16Bit | ( | int16_t | l,
|  | int16_t | r
| ) |  |
| inline static

See also
  MonoOutput::from16Bit(), stereo variant

Definition at line 106 of file AudioOutput.h.

## ◆ from8Bit()

static StereoOutput StereoOutput::from8Bit | ( | int16_t | l,
|  | int16_t | r
| ) |  |
| inline static

See also
  MonoOutput::from8Bit(), stereo variant

Definition at line 104 of file AudioOutput.h.

## ◆ fromAlmostNBit() [1/2]

static StereoOutput StereoOutput::fromAlmostNBit | ( | uint8_t | bits,
|  | int16_t | l,
|  | int16_t | r
| ) |  |
| inline static

See also
  MonoOutput::fromAlmostNBit(), stereo variant

Definition at line 108 of file AudioOutput.h.

## ◆ fromAlmostNBit() [2/2]

static StereoOutput StereoOutput::fromAlmostNBit | ( | uint8_t | bits,
|  | int32_t | l,
|  | int32_t | r
| ) |  |
| inline static

See also
  MonoOutput::fromAlmostNBit(), stereo variant, 32 bit overload

Definition at line 110 of file AudioOutput.h.

## ◆ fromNBit() [1/2]

static StereoOutput StereoOutput::fromNBit | ( | uint8_t | bits,
|  | int16_t | l,
|  | int16_t | r
| ) |  |
| inline static

See also
  MonoOutput::fromNBit(), stereo variant

Definition at line 100 of file AudioOutput.h.

## ◆ fromNBit() [2/2]

static StereoOutput StereoOutput::fromNBit | ( | uint8_t | bits,
|  | int32_t | l,
|  | int32_t | r
| ) |  |
| inline static

See also
  MonoOutput::fromNBit(), stereo variant, 32 bit overload

Definition at line 102 of file AudioOutput.h.