Commit 319de700 authored by vaclav's avatar vaclav
Browse files

properly exit when other than 48 kHz output SR is requested on the command-line

parent 4d7fb32d
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1582,7 +1582,7 @@ static void usage_dec( void )
    fprintf( stdout, "                      works only in combination with '-otr ref_vec' and 'ref_vec_lev' modes\n" );
    fprintf( stdout, "-render_config File : Renderer configuration File\n" );
#ifdef SPLIT_REND_WITH_HEAD_ROT
    fprintf( stdout, "-om File            : Metadata output File for BINAURAL_SPLIT_PCM OutputConf\n" );
    fprintf( stdout, "-om File            : Metadata output File for BINAURAL_SPLIT_PCM OutputConf (only for Fs = 48 kHz)\n" );
#endif
    fprintf( stdout, "-non_diegetic_pan P : panning mono non-diegetic sound to stereo with paning P, -90<= P <=90,\n" );
    fprintf( stdout, "                      left or l or 90->left, right or r or -90->right, center or c or  0->middle\n" );
+7 −0
Original line number Diff line number Diff line
@@ -2748,6 +2748,13 @@ static ivas_error doSanityChecks_IVAS(
        }
    }

#ifdef SPLIT_REND_WITH_HEAD_ROT
    if ( ( output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED || output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) && output_Fs != 48000 )
    {
        return IVAS_ERROR( IVAS_ERR_INVALID_SAMPLING_RATE, "Error: Only 48kHz output sampling rate is supported for split rendering." );
    }
#endif

    if ( st_ivas->hDecoderConfig->Opt_Headrotation )
    {
        if ( !( output_config == AUDIO_CONFIG_BINAURAL || output_config == AUDIO_CONFIG_BINAURAL_ROOM_IR || output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB