A basic spherical harmonic signals rotator.
#ifndef __ROTATOR_H_INCLUDED__
#define __ROTATOR_H_INCLUDED__
#ifdef __cplusplus
extern "C" {
#endif
int samplerate);
const float *const * inputs,
float* const* outputs,
int nInputs,
int nOutputs,
int nSamples);
#ifdef __cplusplus
}
#endif
#endif
A bunch of things that are common to many of the saf examples.
void rotator_setQuaternionW(void *const hRot, float newValue)
Sets the quaternion 'W' value [-1..1].
int rotator_getRPYflag(void *const hRot)
Returns a flag as to whether to use "yaw-pitch-roll" (0) or "roll-pitch-yaw" (1) rotation order.
int rotator_getNSHrequired(void *const hRot)
Returns the number of spherical harmonic signals required by the current input/output order: (current...
int rotator_getFrameSize(void)
Returns the processing framesize (i.e., number of samples processed with every _process() call )
int rotator_getNormType(void *const hRot)
Returns the Ambisonic normalisation convention currently being usedto decode with,...
void rotator_setPitch(void *const hRot, float newPitch)
Sets the 'pitch' rotation angle, in DEGREES.
float rotator_getQuaternionY(void *const hRot)
Returns the quaternion 'Y' value [-1..1].
void rotator_setFlipPitch(void *const hRot, int newState)
Sets a flag as to whether to "flip" the sign of the current 'pitch' angle (0: do not flip sign,...
void rotator_create(void **const phRot)
Creates an instance of rotator.
void rotator_setFlipRoll(void *const hRot, int newState)
Sets a flag as to whether to "flip" the sign of the current 'roll' angle (0: do not flip sign,...
int rotator_getProcessingDelay(void)
Returns the processing delay in samples (may be used for delay compensation features)
float rotator_getQuaternionW(void *const hRot)
Returns the quaternion 'W' value [-1..1].
int rotator_getFlipRoll(void *const hRot)
Returns a flag as to whether to "flip" the sign of the current 'roll' angle (0: do not flip sign,...
void rotator_setRPYflag(void *const hRot, int newState)
Sets a flag as to whether to use "yaw-pitch-roll" (0) or "roll-pitch-yaw" (1) rotation order.
float rotator_getQuaternionZ(void *const hRot)
Returns the quaternion 'Z' value [-1..1].
float rotator_getPitch(void *const hRot)
Returns the 'pitch' rotation angle, in DEGREES.
int rotator_getChOrder(void *const hRot)
Returns the Ambisonic channel ordering convention currently being used to decode with,...
void rotator_init(void *const hRot, int samplerate)
Initialises an instance of rotator with default settings.
void rotator_destroy(void **const phRot)
Destroys an instance of rotator.
void rotator_setQuaternionZ(void *const hRot, float newValue)
Sets the quaternion 'Z' value [-1..1].
float rotator_getYaw(void *const hRot)
Returns the 'yaw' rotation angle, in DEGREES.
int rotator_getOrder(void *const hRot)
Returns the input/output order (see SH_ORDERS enum)
int rotator_getFlipYaw(void *const hRot)
Returns a flag as to whether to "flip" the sign of the current 'yaw' angle (0: do not flip sign,...
void rotator_setRoll(void *const hRot, float newRoll)
Sets the 'roll' rotation angle , in DEGREES.
float rotator_getRoll(void *const hRot)
Returns the 'roll' rotation angle, in DEGREES.
int rotator_getFlipQuaternion(void *const hRot)
Returns a flag as to whether to invert the quaternion used for rotation (0: do not flip sign,...
void rotator_setQuaternionX(void *const hRot, float newValue)
Sets the quaternion 'X' value [-1..1].
void rotator_setNormType(void *const hRot, int newType)
Sets the Ambisonic normalisation convention to decode with, in order to match with the convention emp...
void rotator_setChOrder(void *const hRot, int newOrder)
Sets the Ambisonic channel ordering convention to decode with, in order to match the convention emplo...
float rotator_getQuaternionX(void *const hRot)
Returns the quaternion 'X' value [-1..1].
void rotator_setFlipYaw(void *const hRot, int newState)
Sets a flag as to whether to "flip" the sign of the current 'yaw' angle (0: do not flip sign,...
void rotator_process(void *const hRot, const float *const *inputs, float *const *outputs, int nInputs, int nOutputs, int nSamples)
Rotates the input spherical harmonic signals.
void rotator_setQuaternionY(void *const hRot, float newValue)
Sets the quaternion 'Y' value [-1..1].
int rotator_getFlipPitch(void *const hRot)
Returns a flag as to whether to "flip" the sign of the current 'pitch' angle (0: do not flip sign,...
void rotator_setYaw(void *const hRot, float newYaw)
Sets the 'yaw' rotation angle, in DEGREES.
void rotator_setFlipQuaternion(void *const hRot, int newState)
Sets a flag as to whether to invert the quaternion used for rotation (0: do not flip sign,...
void rotator_setOrder(void *const hRot, int newOrder)
Sets the input/output order (see SH_ORDERS enum)