34#ifndef __ROTATOR_INTERNAL_H_INCLUDED__
35#define __ROTATOR_INTERNAL_H_INCLUDED__
49#if !defined(ROTATOR_FRAME_SIZE)
50# if defined(FRAME_SIZE)
51# define ROTATOR_FRAME_SIZE ( FRAME_SIZE )
53# define ROTATOR_FRAME_SIZE ( 64 )
68#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) && !defined(__STDC_NO_ATOMICS__)
75typedef struct _rotator
#define MAX_NUM_SH_SIGNALS
Maximum number of spherical harmonic components/signals supported.
A basic spherical harmonic/ Ambisonic signals rotator, based on the recursive approach detailed in [1...
M_ROT_STATUS
Available Ambisonic channel ordering conventions.
@ M_ROT_READY
M_rot is ready.
@ M_ROT_RECOMPUTE_QUATERNION
Use Quaternions to recompute M_rot.
@ M_ROT_RECOMPUTE_EULER
Use Euler angles to recompute M_rot.
#define ROTATOR_FRAME_SIZE
Framesize, in time-domain samples.
Main include header for the Spatial_Audio_Framework (SAF)
Include header for SAF externals.
Quaternion data structure.
Main struct for the rotator.
float tempFrame_fadeOut[MAX_NUM_SH_SIGNALS][ROTATOR_FRAME_SIZE]
Temporary frame with linear interpolation (fade-out) applied.
_Atomic_INT32 bFlipYaw
flag to flip the sign of the yaw rotation angle
_Atomic_INT32 useRollPitchYawFlag
rotation order flag, 1: r-p-y, 0: y-p-r
float M_rot[MAX_NUM_SH_SIGNALS][MAX_NUM_SH_SIGNALS]
Current SH rotation matrix [1].
float outputFrameTD_fadeIn[MAX_NUM_SH_SIGNALS][ROTATOR_FRAME_SIZE]
Output frame of SH signals with linear interpolation (fade-in) applied.
_Atomic_FLOAT32 roll
roll (Euler) rotation angle, in degrees
float interpolator_fadeOut[ROTATOR_FRAME_SIZE]
Linear Interpolator (fade-out)
_Atomic_FLOAT32 yaw
yaw (Euler) rotation angle, in degrees
float inputFrameTD[MAX_NUM_SH_SIGNALS][ROTATOR_FRAME_SIZE]
Input frame of signals.
_Atomic_CH_ORDER chOrdering
Ambisonic channel order convention (see CH_ORDER)
int fs
Host sampling rate, in Hz.
_Atomic_SH_ORDERS inputOrder
current input/output SH order
quaternion_data Q
Quaternion used for rotation.
_Atomic_M_ROT_STATUS M_rot_status
see M_ROT_STATUS
_Atomic_INT32 bFlipQuaternion
1: invert quaternion, 0: no inversion
float prev_M_rot[MAX_NUM_SH_SIGNALS][MAX_NUM_SH_SIGNALS]
Previous SH rotation matrix [1].
_Atomic_INT32 bFlipPitch
flag to flip the sign of the pitch rotation angle
float interpolator_fadeIn[ROTATOR_FRAME_SIZE]
Linear Interpolator (fade-in)
_Atomic_INT32 bFlipRoll
flag to flip the sign of the roll rotation angle
float outputFrameTD[MAX_NUM_SH_SIGNALS][ROTATOR_FRAME_SIZE]
Output frame of SH signals.
_Atomic_FLOAT32 pitch
pitch (Euler) rotation angle, in degrees
_Atomic_NORM_TYPES norm
Ambisonic normalisation convention (see NORM_TYPES)
float tempFrame[MAX_NUM_SH_SIGNALS][ROTATOR_FRAME_SIZE]
Temporary frame.