Commit 12aa3387 authored by Dominik Weckbecker's avatar Dominik Weckbecker 💬
Browse files

fix number of TCs in stereo case

parent 29e3d6bb
Loading
Loading
Loading
Loading
+21 −5
Original line number Diff line number Diff line
@@ -248,14 +248,15 @@ ivas_error ivas_spar_dec_open(
        granularity = NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS );
#endif

        if ( ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO )

        )
        if ( ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO 
#ifndef JBM_FOR_OSBA
			|| st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO
#endif		
			) )
        {
#ifdef JBM_FOR_OSBA
            if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC )
            if ( ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) )
            {
                buffer_mode = TC_BUFFER_MODE_RENDERER;
                nchan_tc = st_ivas->hDecoderConfig->nchan_out + st_ivas->nchan_ism;
                nchan_to_allocate = nchan_tc;
            }
@@ -267,6 +268,21 @@ ivas_error ivas_spar_dec_open(
                nchan_to_allocate = nchan_tc;
            }
        }
#ifdef JBM_FOR_OSBA
        else if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO )
		{
            if ( ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) )
            {
                nchan_tc += st_ivas->nchan_ism;
            }
            else
            {
                buffer_mode = TC_BUFFER_MODE_BUFFER;
                nchan_tc = st_ivas->hDecoderConfig->nchan_out;
                nchan_to_allocate = nchan_tc;
            }
		}
#endif
        else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC )
        {
            nchan_to_allocate = 2 * BINAURAL_CHANNELS;