Commit b0b95b90 authored by vaclav's avatar vaclav
Browse files

fix Param and FastConv cases

parent 0082c84e
Loading
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -3844,11 +3844,7 @@ static ivas_error IVAS_DEC_LoadHrtfFromFile(
            }

#ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM
#ifdef FIX_1228_SAMPLING_RATE_MISMATCH_IN_HRTF_FILE
            if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, OutputConfig, hHrtfBinary->hrtf_set_audio_cfg, output_Fs, hHrtfBinary->hrtfReader ) ) != IVAS_ERR_OK )
#else
            if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, OutputConfig, hHrtfBinary->hrtf_set_audio_cfg, hHrtfBinary->hrtfReader ) ) != IVAS_ERR_OK )
#endif
#else
            if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, hHrtfBinary->room_reverb_flag, hHrtfBinary->intern_audio_config, hHrtfBinary->hrtfReader ) ) != IVAS_ERR_OK )
#endif
@@ -3874,11 +3870,7 @@ static ivas_error IVAS_DEC_LoadHrtfFromFile(
                return error;
            }

#ifdef FIX_1228_SAMPLING_RATE_MISMATCH_IN_HRTF_FILE
            if ( ( error = load_parambin_HRTF_from_binary( *hHrtfParambin, output_Fs, hHrtfBinary->hrtfReader ) ) != IVAS_ERR_OK )
#else
            if ( ( error = load_parambin_HRTF_from_binary( *hHrtfParambin, hHrtfBinary->hrtfReader ) ) != IVAS_ERR_OK )
#endif
            {
                if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA )
                {
+0 −8
Original line number Diff line number Diff line
@@ -972,11 +972,7 @@ int main(
            }

#ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM
#ifdef FIX_1228_SAMPLING_RATE_MISMATCH_IN_HRTF_FILE
            if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, args.outConfig.audioConfig, args.inConfig.ambisonicsBuses->audioConfig, args.sampleRate, hrtfFileReader ) ) != IVAS_ERR_OK )
#else
            if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, args.outConfig.audioConfig, args.inConfig.ambisonicsBuses->audioConfig, hrtfFileReader ) ) != IVAS_ERR_OK )
#endif
#else
            if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, 0, IVAS_AUDIO_CONFIG_INVALID, hrtfFileReader ) ) != IVAS_ERR_OK )
#endif
@@ -998,11 +994,7 @@ int main(
                goto cleanup;
            }

#ifdef FIX_1228_SAMPLING_RATE_MISMATCH_IN_HRTF_FILE
            if ( ( error = load_parambin_HRTF_from_binary( *hHrtfParambin, args.sampleRate, hrtfFileReader ) ) != IVAS_ERR_OK )
#else
            if ( ( error = load_parambin_HRTF_from_binary( *hHrtfParambin, hrtfFileReader ) ) != IVAS_ERR_OK )
#endif
            {
                if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA )
                {
+3 −9
Original line number Diff line number Diff line
@@ -2131,9 +2131,6 @@ ivas_error load_fastconv_HRTF_from_binary(
#else
    const int16_t room_reverb_flag,              /* i  : room reverb flag                   */
    const IVAS_AUDIO_CONFIG intern_audio_config, /* i  : internal audio configuration       */
#endif
#ifdef FIX_1228_SAMPLING_RATE_MISMATCH_IN_HRTF_FILE
    const int32_t sampleRate, /* i  : sample rate                         */
#endif
    const hrtfFileReader *hrtfReader /* i  : pointer to hrtfFileReader handle   */
)
@@ -2212,7 +2209,7 @@ ivas_error load_fastconv_HRTF_from_binary(
#endif
        {
#ifdef FIX_1228_SAMPLING_RATE_MISMATCH_IN_HRTF_FILE
            if ( hrtf_header.frequency != sampleRate )
            if ( hrtf_header.frequency != 48000 ) /* note: Parametric renderer data are always stored at 48 kHz */
            {
                return IVAS_ERR_INVALID_HRTF_SAMPLING_RATE;
            }
@@ -2260,9 +2257,6 @@ ivas_error load_fastconv_HRTF_from_binary(

ivas_error load_parambin_HRTF_from_binary(
    IVAS_DEC_HRTF_PARAMBIN_HANDLE hHrtfParamBin, /* i/o: Parametric binauralizer HRTF handle */
#ifdef FIX_1228_SAMPLING_RATE_MISMATCH_IN_HRTF_FILE
    const int32_t sampleRate, /* i  : sample rate                         */
#endif
    const hrtfFileReader *hrtfReader             /* i  : pointer to hrtfFileReader handle    */
)
{
@@ -2316,7 +2310,7 @@ ivas_error load_parambin_HRTF_from_binary(
        if ( hrtf_header.rend_type == HRTF_READER_RENDERER_BINAURAL_PARAMETRIC ) /* Parametric binauralizer data is represented as single entity */
        {
#ifdef FIX_1228_SAMPLING_RATE_MISMATCH_IN_HRTF_FILE
            if ( hrtf_header.frequency != sampleRate )
            if ( hrtf_header.frequency != 48000 ) /* note: Parametric renderer data are always stored at 48 kHz */
            {
                return IVAS_ERR_INVALID_HRTF_SAMPLING_RATE;
            }
+1 −7
Original line number Diff line number Diff line
@@ -167,9 +167,6 @@ ivas_error load_fastconv_HRTF_from_binary(
#else
    const int16_t room_reverb_flag,        /* i  : room reverb flag                 */
    IVAS_AUDIO_CONFIG intern_audio_config, /* i  : internal audio configuration     */
#endif
#ifdef FIX_1228_SAMPLING_RATE_MISMATCH_IN_HRTF_FILE
    const int32_t sampleRate, /* i  : sample rate                      */
#endif
    const hrtfFileReader *hrtfReader /* i  : pointer to hrtfFileReader handle */
);
@@ -192,9 +189,6 @@ void destroy_fastconv_hrtf(

ivas_error load_parambin_HRTF_from_binary(
    IVAS_DEC_HRTF_PARAMBIN_HANDLE hHrtfParambin, /* i/o: Parambin HRTF handle             */
#ifdef FIX_1228_SAMPLING_RATE_MISMATCH_IN_HRTF_FILE
    const int32_t sampleRate, /* i  : sample rate                      */
#endif
    const hrtfFileReader *hrtfReader             /* i  : pointer to hrtfFileReader handle */
);