Commit 4eb391c2 authored by vaclav's avatar vaclav
Browse files

append two structure names with "_isar" to avoid confusions coming from the...

append two structure names with "_isar" to avoid confusions coming from the same structure name at two different places
parent 6f9aa7f6
Loading
Loading
Loading
Loading
Loading
+21 −21
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ typedef struct
#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
    const ISAR_SPLIT_REND_CONFIG_DATA *pSplitRenderConfig;
#endif
} rendering_context;
} rendering_context_isar;

/* Common base for input structs */
typedef struct
@@ -102,13 +102,13 @@ typedef struct
    ISAR_POST_REND_InputId id;
    IVAS_REND_AudioBuffer inputBuffer;
    float gain; /* Linear, not in dB */
    rendering_context ctx;
    rendering_context_isar ctx;
    int32_t numNewSamplesPerChannel; /* Used to keep track how much new audio was fed before rendering current frame */
} input_base;
} input_base_isar;

typedef struct
{
    input_base base;
    input_base_isar base;
    ISAR_SPLIT_POST_REND_WRAPPER splitPostRendWrapper;
    float *bufferData;
    int16_t numCachedSamples; /* Number of decoded samples in bufferData that have not yet been played out */
@@ -438,10 +438,10 @@ static ivas_error initHeadRotation(


static void initRendInputBase(
    input_base *inputBase,
    input_base_isar *inputBase,
    const AUDIO_CONFIG inConfig,
    const IVAS_REND_InputId id,
    const rendering_context rendCtx,
    const rendering_context_isar rendCtx,
    float *dataBuf,
    const int16_t dataBufSize )
{
@@ -463,10 +463,10 @@ static void initRendInputBase(
}


static rendering_context getRendCtx(
static rendering_context_isar getRendCtx(
    ISAR_POST_REND_HANDLE hIvasRend )
{
    rendering_context ctx;
    rendering_context_isar ctx;

    /* Note: when refactoring this, always take the ADDRESS of a member of the
     * renderer struct, so that the context stores a POINTER to the member, even
@@ -488,7 +488,7 @@ static ivas_error getRendInputNumChannels(
    int16_t *numInChannels )
{
    /* Using a void pointer for this function to be reusable for any input type (input_ism, input_mc, input_sba).
        Assumptions:        - input_base is always the first member in the input struct    */
        Assumptions:        - input_base_isar is always the first member in the input struct    */
    (void) rendInput;

    *numInChannels = 2;
@@ -508,7 +508,7 @@ static ivas_error updateSplitPostRendPanGains(
)
{
    ivas_error error;
    rendering_context rendCtx;
    rendering_context_isar rendCtx;
    LC3PLUS_CONFIG config;
    int16_t iNumBlocksPerFrame, iNumLCLDIterationsPerFrame;

@@ -593,7 +593,7 @@ static ivas_error setRendInputActiveSplitPostRend(
)
{
    ivas_error error;
    rendering_context rendCtx;
    rendering_context_isar rendCtx;
    AUDIO_CONFIG outConfig;
    input_split_post_rend *inputSplitPostRend;

@@ -625,7 +625,7 @@ static ivas_error setRendInputActiveSplitPostRend(
static void clearInputSplitRend(
    input_split_post_rend *inputSplitRend )
{
    rendering_context rendCtx;
    rendering_context_isar rendCtx;

    rendCtx = inputSplitRend->base.ctx;

@@ -778,7 +778,7 @@ static ivas_error getInputById(
{
    int32_t inputIndex;
    IVAS_REND_AudioConfigType configType;
    input_base *pInputBase;
    input_base_isar *pInputBase;

    /* Reverse makeInputId() */
    inputIndex = ( inputId & 0xFF ) - 1;
@@ -827,7 +827,7 @@ ivas_error ISAR_POST_REND_SetInputGain(
    const float gain                      /* i  : linear gain (not in dB)    */
)
{
    input_base *inputBase;
    input_base_isar *inputBase;
    ivas_error error;

    /* Validate function arguments */
@@ -855,7 +855,7 @@ static ivas_error getConstInputById(
{
    int32_t inputIndex;
    IVAS_REND_AudioConfigType configType;
    const input_base *pInputBase;
    const input_base_isar *pInputBase;

    /* Reverse makeInputId() */
    inputIndex = ( inputId & 0xFF ) - 1;
@@ -901,21 +901,21 @@ static ivas_error findFreeInputSlot(
    /* Using a void pointer and a separately provided size is a hack for this function
       to be reusable for arrays of any input type (input_ism, input_mc, input_sba, input_masa).
        Assumptions:
            - input_base is always the first member in the input struct
            - input_base_isar is always the first member in the input struct
            - provided size is correct
    */

    int32_t i;
    bool canAddInput;
    const uint8_t *pByte;
    const input_base *pInputBase;
    const input_base_isar *pInputBase;

    canAddInput = false;

    /* Find first unused input in array */
    for ( i = 0, pByte = inputs; i < maxInputs; ++i, pByte += inputStructSize )
    {
        pInputBase = (const input_base *) pByte;
        pInputBase = (const input_base_isar *) pByte;

        if ( pInputBase->inConfig == IVAS_AUDIO_CONFIG_INVALID )
        {
@@ -1010,7 +1010,7 @@ ivas_error ISAR_POST_REND_GetInputNumChannels(
)
{
    ivas_error error;
    const input_base *pInput;
    const input_base_isar *pInput;

    /* Validate function arguments */
    if ( hIvasRend == NULL || numChannels == NULL )
@@ -1101,7 +1101,7 @@ ivas_error ISAR_POST_REND_FeedInputAudio(
)
{
    ivas_error error;
    input_base *inputBase;
    input_base_isar *inputBase;
    int16_t numInputChannels;
    int16_t cldfb2tdSampleFact;

@@ -1250,7 +1250,7 @@ ivas_error ISAR_POST_REND_FeedSplitBinauralBitstream(
)
{
    ivas_error error;
    input_base *inputBase;
    input_base_isar *inputBase;
    input_split_post_rend *inputSplitPostRend;

    /* Validate function arguments */