Commit 8d74dcff authored by vaclav's avatar vaclav
Browse files

fix build

parent 4e53867f
Loading
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -2353,7 +2353,9 @@ ivas_error ivas_jbm_dec_tc_buffer_open(
    const int16_t n_samples_granularity     /* i  : granularity of the renderer/buffer  */
)
{
#ifndef REMOVE_APA_BUFFER
    int16_t nsamp_to_allocate;
#endif
    DECODER_TC_BUFFER_HANDLE hTcBuffer;
    int16_t nMaxSlotsPerSubframe;
#ifdef REMOVE_APA_BUFFER
@@ -2388,7 +2390,9 @@ ivas_error ivas_jbm_dec_tc_buffer_open(
    hTcBuffer->n_samples_discard = 0;
    hTcBuffer->n_samples_flushed = 0;
    hTcBuffer->nb_subframes = MAX_PARAM_SPATIAL_SUBFRAMES;
#ifndef REMOVE_APA_BUFFER
    nsamp_to_allocate = 0;
#endif
    nMaxSlotsPerSubframe = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / hTcBuffer->n_samples_granularity;
    hTcBuffer->num_slots = nMaxSlotsPerSubframe * MAX_PARAM_SPATIAL_SUBFRAMES;
    set_s( hTcBuffer->subframe_nbslots, 0, MAX_JBM_SUBFRAMES_5MS );
@@ -2502,7 +2506,7 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure(

        nMaxSlotsPerSubframeNew = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / n_samples_granularity;
#ifdef DEBUGGING
        int16_t nMaxSlotsPerSubframeOld = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity;
        nMaxSlotsPerSubframeOld = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity;
        assert( hTcBuffer->subframe_nbslots[hTcBuffer->subframes_rendered - 1] == nMaxSlotsPerSubframeOld );
        if ( n_samples_granularity < hTcBuffer->n_samples_granularity )
        {
@@ -2566,8 +2570,8 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure(
        n_samp_full = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC );
        n_samp_residual = 0;
    }

    nsamp_to_allocate = hTcBuffer->nchan_buffer_full * n_samp_full;
    nsamp_to_allocate += nchan_residual * n_samp_residual;

    if ( nsamp_to_allocate == 0 )
    {