Commit 94c54edd authored by vaclav's avatar vaclav
Browse files

Update lib_dec.c

parent 3a1651ba
Loading
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1238,6 +1238,14 @@ ivas_error IVAS_DEC_GetDelay(
    nSamples[2] = (int16_t) roundf( (float) st_ivas->binaural_latency_ns * hDecoderConfig->output_Fs / 1000000000.f );
    nSamples[0] = nSamples[1] + nSamples[2];

#ifdef FIX_MASA_DELAY_PRINTOUT
    if ( st_ivas->ivas_format == MASA_FORMAT )
    {
        /* note: in MASA, all delay is compensated at the decoder by default, so subtract the encoder delay for print-out */
        nSamples[1] -= NS2SA( hDecoderConfig->output_Fs, IVAS_ENC_DELAY_NS );
    }
#endif

    *timeScale = hDecoderConfig->output_Fs;

    return IVAS_ERR_OK;