![]() |
Mach1 Spatial SDK
|
Public Member Functions | |
Mach1Encode (const Mach1Encode &other) | |
Mach1Encode & | operator= (const Mach1Encode &other) |
Mach1Encode (Mach1Encode &&other) noexcept | |
Mach1Encode & | operator= (Mach1Encode &&other) noexcept |
std::vector< Mach1Point3D > | getPoints () |
Returns the control center reference point's normalized coordinate location (XYZ) within the vector panning space. | |
std::vector< std::vector< PCM > > | getGains () |
Returns an array per input channel, resulting in an array of array results each internal array (per input channel) is a list of the needed coefficients to encode to a Mach1 VVBP/SPS format (depending on the selected output mode). | |
std::vector< std::string > | getPointsNames () |
Return the string name for each input channel/point. | |
std::vector< float > | getGainsForInputChannelNamed (const std::string &pointName) |
Given the name of an input channel/point, return array of gain coefficients. | |
void | generatePointResults () |
Recalculate and update the encoder with the currently set spatial configuration. | |
int | getPointsCount () |
Get the number of point results that have been generated after a call to generatePointResults. | |
Mach1EncodeInputMode | getInputMode () |
Get the format in which this Mach1Encode expects to receive audio for encoding. | |
void | setInputMode (Mach1EncodeInputMode inputMode) |
Mach1EncodeOutputMode | getOutputMode () |
Get the format in which this Mach1Encode will output encoded audio. | |
void | setOutputMode (Mach1EncodeOutputMode outputMode) |
Set the format in which this Mach1Encode will output encoded audio. | |
Mach1EncodePannerMode | getPannerMode () |
Get the calculation strategy by which the points in this Mach1Encode are calculated. | |
void | setPannerMode (enum Mach1EncodePannerMode pannerMode) |
Sets the style and mode of panner input calculation. | |
bool | getAutoOrbit () |
Get whether auto-orbit mode is enabled. If true, then orbit rotation is extrapolated from the currently set azimuth. | |
int | getInputChannelsCount () |
Get the number of input channels that this Mach1Encode expects to receive for encoding, depending on the selected input mode. | |
int | getOutputChannelsCount () |
Get the number of output channels that this Mach1Encode expects to receive for encoding, depending on the selected output mode. | |
void | setAzimuth (float azimuthFromMinus1To1) |
Sets the point(s) azimuth rotation of the vector space. | |
void | setAzimuthDegrees (float azimuthDegrees) |
Sets the point(s) azimuth rotation of the vector space. | |
void | setAzimuthRadians (float azimuthRadians) |
Sets the point(s) azimuth rotation of the vector space. | |
void | setElevation (float elevationFromMinus1to1) |
Sets the point(s) up/down the vector space. | |
void | setElevationDegrees (float elevationFromMinus90to90) |
Sets the point(s) up/down the vector space. | |
void | setElevationRadians (float elevationFromMinusHalfPItoHalfPI) |
Sets the point(s) up/down the vector space. | |
void | setFrontSurroundPerspective (bool frontSurroundPerspective) |
float | getOutputGain (bool isDecibel) |
void | setOutputGain (float outputGainMultipler, bool isDecibel) |
float | getGainCompensation (bool isDecibel) |
Gets the current gain compensation value. | |
bool | getGainCompensationActive () |
Gets whether gain compensation is active. | |
void | setGainCompensationActive (bool active) |
Sets whether gain compensation is active. | |
void | setOrbitRotation (float orbitRotationFromMinusOnetoOne) |
Sets the two stereo points around the axis of the center point between them. | |
void | setOrbitRotationDegrees (float orbitRotationDegrees) |
Sets the two stereo points around the axis of the center point between them. | |
void | setOrbitRotationRadians (float orbitRotationRadians) |
Sets the two stereo points around the axis of the center point between them. | |
void | setDiverge (float divergeFromMinus1To1) |
Sets the point(s) to/from center origin of the vector space. | |
void | setStereoSpread (float sSpreadFrom0to1) |
Sets the space between the two stereo points. | |
void | setAutoOrbit (bool autoOrbit) |
Sets whether encoding behavior acts evenly with distribution across all azimuth/rotation angles and all altitude/pitch angles. | |
void | encodeBuffer (std::vector< std::vector< PCM > > &in, std::vector< std::vector< PCM > > &out, int size) |
void | encodeBufferRebuffer (std::vector< std::vector< PCM > > &in, std::vector< std::vector< PCM > > &out, int size) |
void | encodeBufferInPlaceRebuffer (std::vector< std::vector< PCM > > &buffer, size_t buffer_size) |
void | encodeBufferInPlace (std::vector< std::vector< PCM > > &buffer, size_t buffer_size) |
|
inline |
Encode the input buffers and emplace the result into the specified output buffers. Each channel of the buffers are expected to be of the specified size. Processing is performed by directly modifying the output buffer for every iteration of the algorithm.
|
inline |
Encode the specified buffer in-place. Each channel of the buffer is expected to be of the specified size. Processing is performed by directly modifying the buffer for every iteration of the algorithm.
|
inline |
Encode the specified buffer in-place. Each channel of the buffer is expected to be of the specified size. Processing is performed by directly modifying the buffer for every iteration of the algorithm.
|
inline |
Encode the input buffers and emplace the result into the specified output buffers. Each channel of the buffers are expected to be of the specified size. Processing is performed by storing the result of the computation in an intermediary buffer and then copying over the result from the intermediary buffer into the output buffer.
void Mach1Encode< PCM >::generatePointResults | ( | ) |
Recalculate and update the encoder with the currently set spatial configuration.
float Mach1Encode< PCM >::getGainCompensation | ( | bool | isDecibel | ) |
Gets the current gain compensation value.
isDecibel | true if the gain compensation is in decibels, false to return as a linear multiplier |
std::vector< std::vector< PCM > > Mach1Encode< PCM >::getGains | ( | ) |
Returns an array per input channel, resulting in an array of array results each internal array (per input channel) is a list of the needed coefficients to encode to a Mach1 VVBP/SPS format (depending on the selected output mode).
std::vector< float > Mach1Encode< PCM >::getGainsForInputChannelNamed | ( | const std::string & | pointName | ) |
Given the name of an input channel/point, return array of gain coefficients.
pointName | The name of the requested point/channel. |
float Mach1Encode< PCM >::getOutputGain | ( | bool | isDecibel | ) |
Gets the current global gain multiplier which is applied to all output channels equally. Can be calculated with a linear amplitude multiplier or a decibel multiplier.
Mach1EncodePannerMode Mach1Encode< PCM >::getPannerMode | ( | ) |
Get the calculation strategy by which the points in this Mach1Encode are calculated.
Panner modes govern how Mach1Encode distributes your input signal(s) across the Mach1 output points.
std::vector< Mach1Point3D > Mach1Encode< PCM >::getPoints | ( | ) |
Returns the control center reference point's normalized coordinate location (XYZ) within the vector panning space.
void Mach1Encode< PCM >::setAutoOrbit | ( | bool | autoOrbit | ) |
Sets whether encoding behavior acts evenly with distribution across all azimuth/rotation angles and all altitude/pitch angles.
void Mach1Encode< PCM >::setAzimuth | ( | float | azimuthFromMinus1To1 | ) |
Sets the point(s) azimuth rotation of the vector space.
azimuthFromMinus1To1 | floating point value in the range [-1.0; 1.0] |
void Mach1Encode< PCM >::setAzimuthDegrees | ( | float | azimuthDegrees | ) |
Sets the point(s) azimuth rotation of the vector space.
azimuthDegrees | floating point value in the range [0.0; 360.0] |
void Mach1Encode< PCM >::setAzimuthRadians | ( | float | azimuthRadians | ) |
Sets the point(s) azimuth rotation of the vector space.
azimuthRadians | floating point value in the range [-PI; PI] |
void Mach1Encode< PCM >::setDiverge | ( | float | divergeFromMinus1To1 | ) |
Sets the point(s) to/from center origin of the vector space.
divergeFromMinus1To1 | floating point value between -1.0 and 1.0 |
void Mach1Encode< PCM >::setElevation | ( | float | elevationFromMinus1to1 | ) |
Sets the point(s) up/down the vector space.
elevationFromMinus1to1 | floating point value in the range [-1.0; 1.0] |
void Mach1Encode< PCM >::setElevationDegrees | ( | float | elevationFromMinus90to90 | ) |
Sets the point(s) up/down the vector space.
elevationFromMinus90to90 | floating point value in the range [-90.0; 90.0] |
void Mach1Encode< PCM >::setElevationRadians | ( | float | elevationFromMinusHalfPItoHalfPI | ) |
Sets the point(s) up/down the vector space.
elevationFromMinus90to90 | floating point value in the range [-PI / 2.0; PI / 2.0] |
void Mach1Encode< PCM >::setFrontSurroundPerspective | ( | bool | frontSurroundPerspective | ) |
Sets the encoding behavior of the Center input channels of relevant Surround format, when true the encoding behavior assumes first person perspective encoding Center channels toward the front of the sound field, when false we use Center channel literally making it encoded MONO and omni-directional.
void Mach1Encode< PCM >::setGainCompensationActive | ( | bool | active | ) |
Sets whether gain compensation is active.
active | true if gain compensation is active, false if it is not |
Gain compensation is an automatic adjustment to the gain of the output channels to compensate for the gain loss on Mach1Decode side based on the number of output channels of Mach1Encode. This can be useful for ensuring that Mach1Encode instances have the same gain structure when setting a new output mode.
void Mach1Encode< PCM >::setInputMode | ( | Mach1EncodeInputMode | inputMode | ) |
Set the format in which this Mach1Encode expects to receive audio for encoding.
void Mach1Encode< PCM >::setOrbitRotation | ( | float | orbitRotationFromMinusOnetoOne | ) |
Sets the two stereo points around the axis of the center point between them.
orbitRotationFromMinusOnetoOne | floating point value in the range [-1.0; 1.0] |
void Mach1Encode< PCM >::setOrbitRotationDegrees | ( | float | orbitRotationDegrees | ) |
Sets the two stereo points around the axis of the center point between them.
orbitRotationDegrees | floating point value in the range [-180.0; 180.0] |
void Mach1Encode< PCM >::setOrbitRotationRadians | ( | float | orbitRotationRadians | ) |
Sets the two stereo points around the axis of the center point between them.
orbitRotationRadians | floating point value in the range [-PI -> PI] |
void Mach1Encode< PCM >::setOutputGain | ( | float | outputGainMultipler, |
bool | isDecibel | ||
) |
Applies an additional gain multiplier to all output channels equally. Can be calculated with a linear amplitude multiplier or a decibel multiplier.
void Mach1Encode< PCM >::setPannerMode | ( | enum Mach1EncodePannerMode | pannerMode | ) |
Sets the style and mode of panner input calculation.
Panner modes govern how Mach1Encode distributes your input signal(s) across the Mach1 output points. The following modes exist:
pannerMode | The Mach1EncodePannerMode to use for calculation. |
void Mach1Encode< PCM >::setStereoSpread | ( | float | sSpreadFrom0to1 | ) |
Sets the space between the two stereo points.
sSpreadFrom0to1 | floating point value between 0.0 and 1.0 |