SuperpoweredSDK  v2.0.2
Superpowered Audio SDK
Superpowered::StereoMixer Class Reference

Mixes up to 4 stereo inputs. From the traditional mixer hardware point of view, every input and the output has dedicated metering, gain and pan controls. One instance allocates just a few bytes of memory, therefore combining multiple instances of the StereoMixer is the recommended way to support more than 4 channels. More...

#include "SuperpoweredMixer.h"

Public Member Functions

 StereoMixer ()
 Constructor. More...
 
 ~StereoMixer ()
 
void process (float *input0, float *input1, float *input2, float *input3, float *output, unsigned int numberOfFrames)
 Mixes up to 4 interleaved stereo inputs into a stereo output. More...
 

Public Attributes

float inputGain [8]
 Gain per input channel. Default value for all: 1. Changes between consecutive process() calls are automatically smoothed. Example: inputGain[0] = input 0 left, inputGain[1] = input 0 right, inputGain[2] = input 1 left, ... More...
 
float inputPeak [8]
 The peak absolute audio volume per input channel, updated after every process() call, measured before any gain. Example: inputPeak[0] = input 0 left, inputPeak[1] = input 0 right, inputPeak[2] = input 1 left, ... More...
 
float outputGain [2]
 Output gain. [0] is left side, [1] is right side. Default value for all: 1. Changes between consecutive process() calls are automatically smoothed. More...
 
float outputPeak [2]
 The peak absolute audio volume for the output, updated after every process() call. [0] is left side, [1] is right side. More...
 

Private Member Functions

 StereoMixer (const StereoMixer &)
 
StereoMixeroperator= (const StereoMixer &)
 

Private Attributes

stereoMixerInternals * internals
 

Detailed Description

Mixes up to 4 stereo inputs. From the traditional mixer hardware point of view, every input and the output has dedicated metering, gain and pan controls. One instance allocates just a few bytes of memory, therefore combining multiple instances of the StereoMixer is the recommended way to support more than 4 channels.

Constructor & Destructor Documentation

◆ StereoMixer() [1/2]

Superpowered::StereoMixer::StereoMixer ( )

Constructor.

◆ ~StereoMixer()

Superpowered::StereoMixer::~StereoMixer ( )

◆ StereoMixer() [2/2]

Superpowered::StereoMixer::StereoMixer ( const StereoMixer )
private

Member Function Documentation

◆ operator=()

StereoMixer& Superpowered::StereoMixer::operator= ( const StereoMixer )
private

◆ process()

void Superpowered::StereoMixer::process ( float *  input0,
float *  input1,
float *  input2,
float *  input3,
float *  output,
unsigned int  numberOfFrames 
)

Mixes up to 4 interleaved stereo inputs into a stereo output.

Parameters
input0Pointer to floating point numbers. 32-bit interleaved stereo input buffer for the first input. Can be NULL.
input1Pointer to floating point numbers. 32-bit interleaved stereo input buffer for the second input. Can be NULL.
input2Pointer to floating point numbers. 32-bit interleaved stereo input buffer for the third input. Can be NULL.
input3Pointer to floating point numbers. 32-bit interleaved stereo input buffer for the fourth input. Can be NULL.
outputPointer to floating point numbers. 32-bit interleaved stereo output buffer.
numberOfFramesNumber of frames to process. Must be an even number.

Member Data Documentation

◆ inputGain

float Superpowered::StereoMixer::inputGain[8]

Gain per input channel. Default value for all: 1. Changes between consecutive process() calls are automatically smoothed. Example: inputGain[0] = input 0 left, inputGain[1] = input 0 right, inputGain[2] = input 1 left, ...

◆ inputPeak

float Superpowered::StereoMixer::inputPeak[8]

The peak absolute audio volume per input channel, updated after every process() call, measured before any gain. Example: inputPeak[0] = input 0 left, inputPeak[1] = input 0 right, inputPeak[2] = input 1 left, ...

◆ internals

stereoMixerInternals* Superpowered::StereoMixer::internals
private

◆ outputGain

float Superpowered::StereoMixer::outputGain[2]

Output gain. [0] is left side, [1] is right side. Default value for all: 1. Changes between consecutive process() calls are automatically smoothed.

◆ outputPeak

float Superpowered::StereoMixer::outputPeak[2]

The peak absolute audio volume for the output, updated after every process() call. [0] is left side, [1] is right side.


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