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

add sanity checks for output configs. for OMASA/OSBA

parent edb66e10
Loading
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -3096,6 +3096,23 @@ static ivas_error doSanityChecks_IVAS(
            return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Incorrect output configuration specified for Multi-channel" );
        }
    }
#ifdef FIX_1052_SBA_EXT_OUTPUT
    else if ( st_ivas->ivas_format == MASA_ISM_FORMAT )
    {
        if ( output_config == IVAS_AUDIO_CONFIG_INVALID )
        {
            return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Incorrect output configuration specified for OMASA!" );
        }
    }
    else if ( st_ivas->ivas_format == SBA_ISM_FORMAT )
    {
        /* Verify MC output configuration */
        if ( output_config == IVAS_AUDIO_CONFIG_INVALID )
        {
            return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Incorrect output configuration specified for OSBA!" );
        }
    }
#endif

#ifdef SPLIT_REND_WITH_HEAD_ROT
    if ( ( output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) && output_Fs != 48000 )