Commit 10293bc8 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

rename API function and make LFE routing struct private

parent 3cce8239
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -695,7 +695,7 @@ int main(
#ifdef REND_CFG_LFE
        if ( args.pan_lfe )
        {
            if ( ( error = IVAS_REND_SetInputLfeRouting( hIvasRend, mcIds[i], args.lfeConfigGain, args.lfeConfigAzimuth, args.lfeConfigElevation ) ) != IVAS_ERR_OK )
            if ( ( error = IVAS_REND_SetInputLfePan( hIvasRend, mcIds[i], args.lfeConfigGain, args.lfeConfigAzimuth, args.lfeConfigElevation ) ) != IVAS_ERR_OK )
            {
                fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) );
                exit( -1 );
+28 −0
Original line number Diff line number Diff line
@@ -115,6 +115,18 @@ typedef struct
    rotation_matrix rot_mat_prev;
} input_ism;

#ifdef REND_CFG_LFE
typedef struct
{
    int16_t numLfeChannels;
    bool pan_lfe;
    float lfeInputGain;
    float lfeOutputAzimuth;
    float lfeOutputElevation;
    float lfeOutputGains[IVAS_MAX_INPUT_LFE_CHANNELS][IVAS_MAX_OUTPUT_CHANNELS];
} lfe_routing;
#endif

typedef struct
{
    input_base base;
@@ -128,7 +140,11 @@ typedef struct
    TDREND_WRAPPER tdRendWrapper;
    CREND_WRAPPER crendWrapper;
    rotation_gains rot_gains_prev;
#ifdef REND_CFG_LFE
    lfe_routing lfeRouting;
#else
    IVAS_REND_LfeRouting lfeRouting;
#endif
} input_mc;

typedef struct
@@ -1708,14 +1724,22 @@ static ivas_error initMcBinauralRendering(
    return error;
}

#ifdef REND_CFG_LFE
static lfe_routing defaultLfeRouting(
#else
static IVAS_REND_LfeRouting defaultLfeRouting(
#endif
    IVAS_REND_AudioConfig inConfig,
    LSSETUP_CUSTOM_STRUCT customLsIn,
    IVAS_REND_AudioConfig outConfig,
    LSSETUP_CUSTOM_STRUCT customLsOut )
{
    int32_t i;
#ifdef REND_CFG_LFE
    lfe_routing routing;
#else
    IVAS_REND_LfeRouting routing;
#endif

    /* Set all output gains to zero, then route each input LFE consecutively to the next available output LFE. */

@@ -3019,7 +3043,11 @@ ivas_error IVAS_REND_SetInputGain(
    return IVAS_ERR_OK;
}

#ifdef REND_CFG_LFE
ivas_error IVAS_REND_SetInputLfePan(
#else
ivas_error IVAS_REND_SetInputLfeRouting(
#endif
    IVAS_REND_HANDLE hIvasRend,
    const IVAS_REND_InputId inputId,
#ifdef REND_CFG_LFE
+6 −6
Original line number Diff line number Diff line
@@ -133,17 +133,13 @@ typedef enum

typedef uint16_t IVAS_REND_InputId;

#ifndef REND_CFG_LFE
typedef struct
{
    int16_t numLfeChannels;
#ifdef REND_CFG_LFE
    bool pan_lfe;
    float lfeInputGain;
    float lfeOutputAzimuth;
    float lfeOutputElevation;
#endif
    float lfeOutputGains[IVAS_MAX_INPUT_LFE_CHANNELS][IVAS_MAX_OUTPUT_CHANNELS];
} IVAS_REND_LfeRouting;
#endif

/* clang-format off */
/*----------------------------------------------------------------------------------*
@@ -197,7 +193,11 @@ ivas_error IVAS_REND_SetInputGain(
    const float gain                                /* i  : linear gain (not in dB)                             */
);

#ifdef REND_CFG_LFE
ivas_error IVAS_REND_SetInputLfePan(
#else
ivas_error IVAS_REND_SetInputLfeRouting(
#endif
    IVAS_REND_HANDLE hIvasRend,                     /* i/o: Renderer handle                                     */
    const IVAS_REND_InputId inputId,                /* i  : ID of the input                                     */
#ifdef REND_CFG_LFE