Commit dc6200e7 authored by kinuthia's avatar kinuthia
Browse files

fix compiler warnings

parent 52c1b325
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -206,7 +206,7 @@ typedef struct _IVAS_RENDER_CONFIG
    IVAS_SPLIT_REND_CONFIG_DATA split_rend_config;
#endif
#ifdef CONTROL_METADATA_DIRECTIVITY
    float directivity[IVAS_MAX_NUM_OBJECTS][3];
    float directivity[IVAS_MAX_NUM_OBJECTS * 3];
#else
    float directivity[3];
#endif
+2 −14
Original line number Diff line number Diff line
@@ -1474,9 +1474,6 @@ ivas_error IVAS_DEC_GetRenderConfig(
)
{
    RENDER_CONFIG_HANDLE hRCin;
#ifdef CONTROL_METADATA_DIRECTIVITY
    int16_t i;
#endif

    if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL || hIvasDec->st_ivas->hRenderConfig == NULL || hRCout == NULL )
    {
@@ -1507,10 +1504,7 @@ ivas_error IVAS_DEC_GetRenderConfig(
    mvr2r( hRCin->roomAcoustics.pAcoustic_rt60, hRCout->room_acoustics.pAcoustic_rt60, CLDFB_NO_CHANNELS_MAX );
    mvr2r( hRCin->roomAcoustics.pAcoustic_dsr, hRCout->room_acoustics.pAcoustic_dsr, CLDFB_NO_CHANNELS_MAX );
#ifdef CONTROL_METADATA_DIRECTIVITY
    for ( i = 0; i < IVAS_MAX_NUM_OBJECTS; i++ )
    {
        mvr2r( hRCin->directivity[i], hRCout->directivity[i], 3 );
    }
    mvr2r( hRCin->directivity, hRCout->directivity, 3 * MAX_NUM_OBJECTS );
#else
    mvr2r( hRCin->directivity, hRCout->directivity, 3 );
#endif
@@ -1543,9 +1537,6 @@ ivas_error IVAS_DEC_FeedRenderConfig(
#ifdef SPLIT_REND_WITH_HEAD_ROT
    ivas_error error;
#endif
#ifdef CONTROL_METADATA_DIRECTIVITY
    int16_t i;
#endif

    if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL || hIvasDec->st_ivas->hRenderConfig == NULL )
    {
@@ -1573,10 +1564,7 @@ ivas_error IVAS_DEC_FeedRenderConfig(
    mvr2r( renderConfig.room_acoustics.pAcoustic_dsr, hRenderConfig->roomAcoustics.pAcoustic_dsr, CLDFB_NO_CHANNELS_MAX );
    
#ifdef CONTROL_METADATA_DIRECTIVITY
    for ( i = 0; i < IVAS_MAX_NUM_OBJECTS; i++ )
    {
        mvr2r( renderConfig.directivity[i], hRenderConfig->directivity[i], 3 );
    }
    mvr2r( renderConfig.directivity, hRenderConfig->directivity, 3 * MAX_NUM_OBJECTS );
#else
    mvr2r( renderConfig.directivity, hRenderConfig->directivity, 3 );
#endif
+4 −11
Original line number Diff line number Diff line
@@ -68,11 +68,7 @@ ivas_error ivas_td_binaural_open_unwrap(
    const int16_t nchan_transport,       /* i  : Number of channels                  */
    const IVAS_FORMAT ivas_format,       /* i  : IVAS format (ISM/MC)                */
    const AUDIO_CONFIG transport_config, /* i  : Transport configuration             */
#ifdef CONTROL_METADATA_DIRECTIVITY
    const float directivity[MAX_NUM_OBJECTS][3], /* i  : Directivity pattern (used for ISM)  */
#else
    const float *directivity, /* i  : Directivity pattern (used for ISM)  */
#endif
    const IVAS_OUTPUT_SETUP hTransSetup,                /* i  : Loudspeaker layout                  */
    BINAURAL_TD_OBJECT_RENDERER_HANDLE *hBinRendererTd, /* o  : TD renderer handle                  */
    int32_t *binaural_latency_ns                        /* i  : Binauralization delay               */
@@ -226,9 +222,9 @@ ivas_error ivas_td_binaural_open_unwrap(
            }
            else
            {
                DirAtten_p->ConeInnerAngle = directivity[nS][0];
                DirAtten_p->ConeOuterAngle = directivity[nS][1];
                DirAtten_p->ConeOuterGain = directivity[nS][2];
                DirAtten_p->ConeInnerAngle = directivity[nS * 3];
                DirAtten_p->ConeOuterAngle = directivity[nS * 3 + 1];
                DirAtten_p->ConeOuterGain = directivity[nS * 3 + 2];
            }
#endif
            TDREND_MIX_SRC_SetDirAtten( pBinRendTd, nS, DirAtten_p );
@@ -645,11 +641,8 @@ ivas_error ivas_td_binaural_open_ext(
    IVAS_FORMAT ivas_format;
    IVAS_OUTPUT_SETUP hTransSetup;
    ivas_error error;
#ifdef CONTROL_METADATA_DIRECTIVITY
    float (*directivity)[3] = NULL;
#else

    float *directivity = NULL;
#endif

    if ( inConfig != IVAS_REND_AUDIO_CONFIG_LS_CUSTOM )
    {
+0 −4
Original line number Diff line number Diff line
@@ -271,11 +271,7 @@ ivas_error ivas_td_binaural_open_unwrap(
    const int16_t nchan_transport,                              /* i  : Number of channels                      */
    const IVAS_FORMAT ivas_format,                              /* i  : IVAS format (ISM/MC)                    */
    const AUDIO_CONFIG transport_config,                        /* i  : Transport configuration                 */
#ifdef CONTROL_METADATA_DIRECTIVITY
    const float directivity[MAX_NUM_OBJECTS][3], /* i  : Directivity pattern (used for ISM)  */
#else
    const float *directivity,                                   /* i  : Directivity pattern (used for ISM)      */
#endif
    const IVAS_OUTPUT_SETUP hTransSetup,                        /* i  : Loudspeaker layout                      */
    BINAURAL_TD_OBJECT_RENDERER_HANDLE *hBinRendererTd,         /* o  : TD renderer handle                      */
    int32_t *binaural_latency_ns                                /* i  : Binauralization delay                   */
+3 −3
Original line number Diff line number Diff line
@@ -131,9 +131,9 @@ ivas_error ivas_render_config_init_from_rom(
#ifdef CONTROL_METADATA_DIRECTIVITY
    for (i = 0; i < MAX_NUM_OBJECTS; i++)
    {
        ( *hRenderConfig )->directivity[i][0] = 360.0f; /* Front cone */
        ( *hRenderConfig )->directivity[i][1] = 360.0f; /* Back cone */
        ( *hRenderConfig )->directivity[i][2] = 1.0f;   /* Back attenuation */
        ( *hRenderConfig )->directivity[i * 3] = 360.0f; /* Front cone */
        ( *hRenderConfig )->directivity[i * 3 + 1] = 360.0f; /* Back cone */
        ( *hRenderConfig )->directivity[i * 3 + 2] = 1.0f;       /* Back attenuation */
    }
#else
    ( *hRenderConfig )->directivity[0] = 360.0f; /* Front cone */
Loading