Commit de3ed031 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

[fix] use a Quaternion pointer instead

parent b5627024
Loading
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ static ivas_error TDREND_GetMix( BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRenderer
#endif
static void TDREND_Clear_Update_flags( BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd );
#ifdef FIX_I106_TDREND_5MS
static void TDREND_Update_listener_orientation( BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd, const int16_t headRotEnabled, const Quaternion headPosition );
static void TDREND_Update_listener_orientation( BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd, const int16_t headRotEnabled, const Quaternion *headPosition );
static void TDREND_Update_object_positions( BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd, const int16_t numSources, const IVAS_FORMAT in_format, const ISM_METADATA_HANDLE *hIsmMetaData, float output[][L_FRAME48k] );
#endif

@@ -347,7 +347,9 @@ void ObjRenderIVASFrame(
    for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ )
    {
        /* Update the listener's location/orientation */
        TDREND_Update_listener_orientation( st_ivas->hBinRendererTd, st_ivas->hDecoderConfig->Opt_Headrotation, st_ivas->hHeadTrackData->Quaternions[subframe_idx] );
        TDREND_Update_listener_orientation( st_ivas->hBinRendererTd,
                                            st_ivas->hDecoderConfig->Opt_Headrotation,
                                            ( st_ivas->hHeadTrackData != NULL ) ? &st_ivas->hHeadTrackData->Quaternions[subframe_idx] : NULL );

        if ( ( st_ivas->hRenderConfig != NULL ) && ( st_ivas->hRenderConfig->roomAcoustics.late_reverb_on ) )
        {
@@ -573,7 +575,7 @@ static void TDREND_Update_object_positions(
static void TDREND_Update_listener_orientation(
    BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd, /* i/o: TD Renderer handle    */
    const int16_t headRotEnabled,                      /* i  : Headrotation flag     */
    const Quaternion headPosition                      /* i  : Head Position         */
    const Quaternion *headPosition                     /* i  : Head Position         */
)
{
    float Pos[3];
@@ -590,7 +592,7 @@ static void TDREND_Update_listener_orientation(
    if ( headRotEnabled )
    {
        /* Obtain head rotation matrix */
        QuatToRotMat( headPosition, Rmat );
        QuatToRotMat( *headPosition, Rmat );
        /* Apply rotation matrix to looking vector [1;0;0] */
        FrontVec[0] = Rmat[0][0];
        FrontVec[1] = Rmat[0][1];