Commit 9139be35 authored by Jouni Paulus's avatar Jouni Paulus
Browse files

output sampling rate verification for split rendering in general

parent 997677d1
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -640,6 +640,14 @@ static ivas_error validateOutputSampleRate(
        /* If no binaural rendering, any sampling rate is supported */
        return IVAS_ERR_OK;
    }
#ifdef SPLIT_REND_WITH_HEAD_ROT
    else if ( ( outConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || outConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) && sampleRate != 48000 )
    {
        return IVAS_ERROR( IVAS_ERR_INVALID_SAMPLING_RATE, "Error: Only 48kHz output sampling rate is supported for split rendering." );
    }
    else
    {
#endif

    /* Otherwise rendering to binaural, support the same set as IVAS decoder */
    switch ( sampleRate )
@@ -652,6 +660,9 @@ static ivas_error validateOutputSampleRate(
    }

    return IVAS_ERR_INVALID_SAMPLING_RATE;
#ifdef SPLIT_REND_WITH_HEAD_ROT
    }
#endif
}