Loading apps/renderer.c +2 −1 Original line number Diff line number Diff line Loading @@ -2054,7 +2054,8 @@ static void parseOption( #ifdef FIX_488_SYNC_DELAY case CmdLnOptionId_syncMdDelay: assert( numOptionValues == 1 ); args->syncMdDelay = (int16_t) floor( strtof( optionValues[0], NULL ) / 5 ); /* Metadata Delay to sync with audio delay converted from ms to 5ms (1/50/4*1000) subframe index */ args->syncMdDelay = (int16_t) floor( strtof( optionValues[0], NULL ) / ( 1 / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES * 1000 ) ); break; #endif default: Loading lib_rend/ivas_objectRenderer.c +1 −1 Original line number Diff line number Diff line Loading @@ -616,7 +616,7 @@ ivas_error ivas_td_binaural_renderer_ext( const IVAS_REND_AudioObjectPosition *currentPos, /* i : Object position */ const REVERB_HANDLE hReverb, /* i : Reverberator handle */ #ifdef FIX_488_SYNC_DELAY const ism_md_subframe_update_ext, const ism_md_subframe_update_ext, /* i: Metadata Delay in subframes to sync with audio delay */ #endif const int16_t output_frame, /* i : output frame length */ float output[][L_FRAME48k] /* i/o: SCE channels / Binaural synthesis */ Loading lib_rend/ivas_prot_rend.h +1 −1 Original line number Diff line number Diff line Loading @@ -253,7 +253,7 @@ ivas_error ivas_td_binaural_renderer_ext( const IVAS_REND_AudioObjectPosition *currentPos, /* i : Object position */ const REVERB_HANDLE hReverb, /* i : Reverberator handle */ #ifdef FIX_488_SYNC_DELAY const int16_t ism_md_subframe_update_ext, const int16_t ism_md_subframe_update_ext, /* i: Metadata Delay in subframes to sync with audio delay */ #endif const int16_t output_frame, /* i : output frame length */ float output[][L_FRAME48k] /* i/o: SCE channels / Binaural synthesis */ Loading lib_rend/lib_rend.c +11 −24 Original line number Diff line number Diff line Loading @@ -123,6 +123,9 @@ typedef struct float nonDiegeticPanGain; OMASA_ANA_HANDLE hOMasa; uint16_t total_num_objects; #ifdef FIX_488_SYNC_DELAY int16_t ism_md_subframe_update_ext; #endif } input_ism; typedef struct Loading Loading @@ -4662,9 +4665,6 @@ static ivas_error rotateFrameSba( static ivas_error renderIsmToBinaural( const input_ism *ismInput, #ifdef FIX_488_SYNC_DELAY const int16_t ism_md_subframe_update_ext, #endif IVAS_REND_AudioBuffer outAudio ) { float tmpTDRendBuffer[MAX_OUTPUT_CHANNELS][L_FRAME48k]; Loading @@ -4681,7 +4681,7 @@ static ivas_error renderIsmToBinaural( &ismInput->currentPos, ismInput->hReverb, #ifdef FIX_488_SYNC_DELAY ism_md_subframe_update_ext, ismInput->ism_md_subframe_update_ext, #endif outAudio.config.numSamplesPerChannel, tmpTDRendBuffer ) ) != IVAS_ERR_OK ) Loading Loading @@ -4839,9 +4839,6 @@ static ivas_error renderIsmToBinauralRoom( static ivas_error renderIsmToBinauralReverb( input_ism *ismInput, #ifdef FIX_488_SYNC_DELAY const int16_t ism_md_subframe_update_ext, #endif IVAS_REND_AudioBuffer outAudio ) { #ifdef JBM_TSM_ON_TCS Loading Loading @@ -4869,7 +4866,7 @@ static ivas_error renderIsmToBinauralReverb( &ismInput->currentPos, ismInput->hReverb, #ifdef FIX_488_SYNC_DELAY ism_md_subframe_update_ext, ismInput->ism_md_subframe_update_ext, #endif outAudio.config.numSamplesPerChannel, tmpRendBuffer ) ) != IVAS_ERR_OK ) Loading Loading @@ -5018,9 +5015,6 @@ static ivas_error renderIsmToMasa( static ivas_error renderInputIsm( input_ism *ismInput, #ifdef FIX_488_SYNC_DELAY const int16_t ism_md_subframe_update_ext, #endif const IVAS_REND_AudioConfig outConfig, const IVAS_REND_AudioBuffer outAudio ) { Loading Loading @@ -5051,21 +5045,13 @@ static ivas_error renderInputIsm( switch ( outConfig ) { case IVAS_REND_AUDIO_CONFIG_BINAURAL: #ifdef FIX_488_SYNC_DELAY error = renderIsmToBinaural( ismInput, ism_md_subframe_update_ext, outAudio ); #else error = renderIsmToBinaural( ismInput, outAudio ); #endif break; case IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM_IR: error = renderIsmToBinauralRoom( ismInput, outAudio ); break; case IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM_REVERB: #ifdef FIX_488_SYNC_DELAY error = renderIsmToBinauralReverb( ismInput, ism_md_subframe_update_ext, outAudio ); #else error = renderIsmToBinauralReverb( ismInput, outAudio ); #endif break; default: return IVAS_ERR_INVALID_OUTPUT_FORMAT; Loading @@ -5089,7 +5075,7 @@ static ivas_error renderInputIsm( static ivas_error renderActiveInputsIsm( IVAS_REND_HANDLE hIvasRend, #ifdef FIX_488_SYNC_DELAY const int16_t ism_md_subframe_update_ext, const int16_t sync_md_delay, /* i: Metadata Delay in subframes to sync with audio delay */ #endif IVAS_REND_AudioBuffer outAudio ) { Loading @@ -5105,10 +5091,11 @@ static ivas_error renderActiveInputsIsm( continue; } #ifdef FIX_488_SYNC_DELAY if ( ( error = renderInputIsm( pCurrentInput, ism_md_subframe_update_ext, hIvasRend->outputConfig, outAudio ) ) != IVAS_ERR_OK ) #else if ( ( error = renderInputIsm( pCurrentInput, hIvasRend->outputConfig, outAudio ) ) != IVAS_ERR_OK ) /* Metadata Delay in subframes to sync with audio delay */ pCurrentInput->ism_md_subframe_update_ext = sync_md_delay; #endif if ( ( error = renderInputIsm( pCurrentInput, hIvasRend->outputConfig, outAudio ) ) != IVAS_ERR_OK ) { return error; } Loading Loading @@ -6398,7 +6385,7 @@ ivas_error IVAS_REND_SetTotalNumberOfObjects( ivas_error IVAS_REND_GetSamples( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ #ifdef FIX_488_SYNC_DELAY const int16_t sync_md_delay, const int16_t sync_md_delay, /* i: Metadata Delay in subframes to sync with audio delay */ #endif IVAS_REND_AudioBuffer outAudio /* i/o: buffer for output audio */ ) Loading lib_rend/lib_rend.h +1 −1 Original line number Diff line number Diff line Loading @@ -321,7 +321,7 @@ ivas_error IVAS_REND_GetNumAllObjects( ivas_error IVAS_REND_GetSamples( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ #ifdef FIX_488_SYNC_DELAY const int16_t sync_md_delay, const int16_t sync_md_delay, /* i: Metadata Delay in subframes to sync with audio delay */ #endif IVAS_REND_AudioBuffer outAudio /* i/o: buffer for output audio */ ); Loading Loading
apps/renderer.c +2 −1 Original line number Diff line number Diff line Loading @@ -2054,7 +2054,8 @@ static void parseOption( #ifdef FIX_488_SYNC_DELAY case CmdLnOptionId_syncMdDelay: assert( numOptionValues == 1 ); args->syncMdDelay = (int16_t) floor( strtof( optionValues[0], NULL ) / 5 ); /* Metadata Delay to sync with audio delay converted from ms to 5ms (1/50/4*1000) subframe index */ args->syncMdDelay = (int16_t) floor( strtof( optionValues[0], NULL ) / ( 1 / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES * 1000 ) ); break; #endif default: Loading
lib_rend/ivas_objectRenderer.c +1 −1 Original line number Diff line number Diff line Loading @@ -616,7 +616,7 @@ ivas_error ivas_td_binaural_renderer_ext( const IVAS_REND_AudioObjectPosition *currentPos, /* i : Object position */ const REVERB_HANDLE hReverb, /* i : Reverberator handle */ #ifdef FIX_488_SYNC_DELAY const ism_md_subframe_update_ext, const ism_md_subframe_update_ext, /* i: Metadata Delay in subframes to sync with audio delay */ #endif const int16_t output_frame, /* i : output frame length */ float output[][L_FRAME48k] /* i/o: SCE channels / Binaural synthesis */ Loading
lib_rend/ivas_prot_rend.h +1 −1 Original line number Diff line number Diff line Loading @@ -253,7 +253,7 @@ ivas_error ivas_td_binaural_renderer_ext( const IVAS_REND_AudioObjectPosition *currentPos, /* i : Object position */ const REVERB_HANDLE hReverb, /* i : Reverberator handle */ #ifdef FIX_488_SYNC_DELAY const int16_t ism_md_subframe_update_ext, const int16_t ism_md_subframe_update_ext, /* i: Metadata Delay in subframes to sync with audio delay */ #endif const int16_t output_frame, /* i : output frame length */ float output[][L_FRAME48k] /* i/o: SCE channels / Binaural synthesis */ Loading
lib_rend/lib_rend.c +11 −24 Original line number Diff line number Diff line Loading @@ -123,6 +123,9 @@ typedef struct float nonDiegeticPanGain; OMASA_ANA_HANDLE hOMasa; uint16_t total_num_objects; #ifdef FIX_488_SYNC_DELAY int16_t ism_md_subframe_update_ext; #endif } input_ism; typedef struct Loading Loading @@ -4662,9 +4665,6 @@ static ivas_error rotateFrameSba( static ivas_error renderIsmToBinaural( const input_ism *ismInput, #ifdef FIX_488_SYNC_DELAY const int16_t ism_md_subframe_update_ext, #endif IVAS_REND_AudioBuffer outAudio ) { float tmpTDRendBuffer[MAX_OUTPUT_CHANNELS][L_FRAME48k]; Loading @@ -4681,7 +4681,7 @@ static ivas_error renderIsmToBinaural( &ismInput->currentPos, ismInput->hReverb, #ifdef FIX_488_SYNC_DELAY ism_md_subframe_update_ext, ismInput->ism_md_subframe_update_ext, #endif outAudio.config.numSamplesPerChannel, tmpTDRendBuffer ) ) != IVAS_ERR_OK ) Loading Loading @@ -4839,9 +4839,6 @@ static ivas_error renderIsmToBinauralRoom( static ivas_error renderIsmToBinauralReverb( input_ism *ismInput, #ifdef FIX_488_SYNC_DELAY const int16_t ism_md_subframe_update_ext, #endif IVAS_REND_AudioBuffer outAudio ) { #ifdef JBM_TSM_ON_TCS Loading Loading @@ -4869,7 +4866,7 @@ static ivas_error renderIsmToBinauralReverb( &ismInput->currentPos, ismInput->hReverb, #ifdef FIX_488_SYNC_DELAY ism_md_subframe_update_ext, ismInput->ism_md_subframe_update_ext, #endif outAudio.config.numSamplesPerChannel, tmpRendBuffer ) ) != IVAS_ERR_OK ) Loading Loading @@ -5018,9 +5015,6 @@ static ivas_error renderIsmToMasa( static ivas_error renderInputIsm( input_ism *ismInput, #ifdef FIX_488_SYNC_DELAY const int16_t ism_md_subframe_update_ext, #endif const IVAS_REND_AudioConfig outConfig, const IVAS_REND_AudioBuffer outAudio ) { Loading Loading @@ -5051,21 +5045,13 @@ static ivas_error renderInputIsm( switch ( outConfig ) { case IVAS_REND_AUDIO_CONFIG_BINAURAL: #ifdef FIX_488_SYNC_DELAY error = renderIsmToBinaural( ismInput, ism_md_subframe_update_ext, outAudio ); #else error = renderIsmToBinaural( ismInput, outAudio ); #endif break; case IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM_IR: error = renderIsmToBinauralRoom( ismInput, outAudio ); break; case IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM_REVERB: #ifdef FIX_488_SYNC_DELAY error = renderIsmToBinauralReverb( ismInput, ism_md_subframe_update_ext, outAudio ); #else error = renderIsmToBinauralReverb( ismInput, outAudio ); #endif break; default: return IVAS_ERR_INVALID_OUTPUT_FORMAT; Loading @@ -5089,7 +5075,7 @@ static ivas_error renderInputIsm( static ivas_error renderActiveInputsIsm( IVAS_REND_HANDLE hIvasRend, #ifdef FIX_488_SYNC_DELAY const int16_t ism_md_subframe_update_ext, const int16_t sync_md_delay, /* i: Metadata Delay in subframes to sync with audio delay */ #endif IVAS_REND_AudioBuffer outAudio ) { Loading @@ -5105,10 +5091,11 @@ static ivas_error renderActiveInputsIsm( continue; } #ifdef FIX_488_SYNC_DELAY if ( ( error = renderInputIsm( pCurrentInput, ism_md_subframe_update_ext, hIvasRend->outputConfig, outAudio ) ) != IVAS_ERR_OK ) #else if ( ( error = renderInputIsm( pCurrentInput, hIvasRend->outputConfig, outAudio ) ) != IVAS_ERR_OK ) /* Metadata Delay in subframes to sync with audio delay */ pCurrentInput->ism_md_subframe_update_ext = sync_md_delay; #endif if ( ( error = renderInputIsm( pCurrentInput, hIvasRend->outputConfig, outAudio ) ) != IVAS_ERR_OK ) { return error; } Loading Loading @@ -6398,7 +6385,7 @@ ivas_error IVAS_REND_SetTotalNumberOfObjects( ivas_error IVAS_REND_GetSamples( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ #ifdef FIX_488_SYNC_DELAY const int16_t sync_md_delay, const int16_t sync_md_delay, /* i: Metadata Delay in subframes to sync with audio delay */ #endif IVAS_REND_AudioBuffer outAudio /* i/o: buffer for output audio */ ) Loading
lib_rend/lib_rend.h +1 −1 Original line number Diff line number Diff line Loading @@ -321,7 +321,7 @@ ivas_error IVAS_REND_GetNumAllObjects( ivas_error IVAS_REND_GetSamples( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ #ifdef FIX_488_SYNC_DELAY const int16_t sync_md_delay, const int16_t sync_md_delay, /* i: Metadata Delay in subframes to sync with audio delay */ #endif IVAS_REND_AudioBuffer outAudio /* i/o: buffer for output audio */ ); Loading