Commit 1c2c2e4a authored by vaclav's avatar vaclav
Browse files

clang-format

parent ca5c102d
Loading
Loading
Loading
Loading
Loading
+26 −6
Original line number Diff line number Diff line
@@ -1422,20 +1422,40 @@ ivas_error IVAS_DEC_Setup(

        if ( st_ivas->bfi == 0 )
        {
#ifdef SPLIT_REND_WITH_HEAD_ROT
            if ( ( error = ivas_dec_setup( st_ivas, &nSamplesRendered_loc, pcm_type_API_to_internal( pcmType ), data ) ) != IVAS_ERR_OK )
#else
            if ( ( error = ivas_dec_setup( st_ivas, &nSamplesRendered_loc, data ) ) != IVAS_ERR_OK )
#endif
            {
                return error;
            }
        }

        /*-----------------------------------------------------------------*
         * ISAR:
         * - initialize ISAR handle at the first frame
         * - reconfigure the ISAR handle in case of bitrate switching (renderer might change)
         *-----------------------------------------------------------------*/

        if ( st_ivas->ini_frame == 0 && ( is_split_rendering_enabled( st_ivas->hDecoderConfig, st_ivas->hRenderConfig ) ) )
        {
            if ( ( error = ivas_dec_init_split_rend( st_ivas ) ) != IVAS_ERR_OK )
            {
                return error;
            }
        }

        if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
        {
            if ( ( error = ivas_dec_reconfig_split_rend( st_ivas ) ) != IVAS_ERR_OK )
            {
                return error;
            }
        }

        /* Final updates */
        if ( nSamplesRendered != NULL )
        {
            *nSamplesRendered = nSamplesRendered_loc;
        }

        hIvasDec->nSamplesRendered_flush = nSamplesRendered_loc;
    }