Loading apps/renderer.c +23 −0 Original line number Diff line number Diff line Loading @@ -671,9 +671,17 @@ int main( IVAS_RENDER_CONFIG_DATA renderConfig; /* sanity check */ #ifdef TD5 if ( ( args.outConfig.audioConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL ) && ( args.outConfig.audioConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM ) ) #else if ( args.outConfig.audioConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM ) #endif { #ifdef TD5 fprintf( stderr, "\nExternal Renderer Config is supported only when BINAURAL or BINAURAL_ROOM is used as output. Exiting. \n" ); #else fprintf( stderr, "\nExternal Renderer Config is supported only when BINAURAL_ROOM is used as output. Exiting. \n" ); #endif exit( -1 ); } Loading Loading @@ -910,11 +918,19 @@ int main( #else HeadRotationFileReading( headRotReader, quatBuffer, frame ); #endif #ifdef TD5 IVAS_REND_SetHeadRotationAndPosition( hIvasRend, quatBuffer, Pos ); #else IVAS_REND_SetHeadRotation( hIvasRend, quatBuffer ); #endif } else { #ifdef TD5 IVAS_REND_SetHeadRotationAndPosition( hIvasRend, NULL, NULL ); #else IVAS_REND_SetHeadRotation( hIvasRend, NULL ); #endif } for ( i = 0; i < args.inConfig.numMultiChannelBuses; ++i ) Loading Loading @@ -1744,6 +1760,10 @@ void getMetadataFromFileReader( objectMetadataBuffer->positions[objIdx].azimuth = ismMetadata.azimuth; objectMetadataBuffer->positions[objIdx].elevation = ismMetadata.elevation; #ifdef TD5 objectMetadataBuffer->positions[objIdx].radius = ismMetadata.radius; #endif return; } Loading Loading @@ -1798,6 +1818,9 @@ static void IsmPositionProvider_getNextFrame( { objectMetadataBuffer->positions[objIdx].azimuth = 0.0f; objectMetadataBuffer->positions[objIdx].elevation = 0.0f; #ifdef TD5 objectMetadataBuffer->positions[objIdx].radius = 1.0f; #endif } /* Wrap azimuth to lie within (-180, 180] range */ Loading lib_com/common_api_types.h +3 −0 Original line number Diff line number Diff line Loading @@ -119,6 +119,9 @@ typedef struct { float azimuth; float elevation; #ifdef TD5 float radius; #endif } IVAS_REND_AudioObjectPosition; typedef struct _IVAS_ROOM_ACOUSTICS_CONFIG Loading lib_rend/ivas_objectRenderer.c +3 −0 Original line number Diff line number Diff line Loading @@ -800,6 +800,9 @@ ivas_error ivas_td_binaural_renderer_ext( hIsmMetaData[0] = &hIsmMetaDataFrame; hIsmMetaData[0]->azimuth = currentPos->azimuth; hIsmMetaData[0]->elevation = currentPos->elevation; #ifdef TD5 hIsmMetaData[0]->radius = currentPos->radius; #endif } Loading lib_rend/lib_rend.c +40 −4 Original line number Diff line number Diff line Loading @@ -1009,6 +1009,9 @@ static IVAS_REND_AudioObjectPosition defaultObjectPosition( pos.azimuth = 0.0f; pos.elevation = 0.0f; #ifdef TD5 pos.radius = 0.0f; #endif return pos; } Loading Loading @@ -3943,6 +3946,9 @@ int16_t IVAS_REND_FeedRenderConfig( mvr2r( renderConfig.room_acoustics.pFc_input, hRenderConfig->roomAcoustics.pFc_input, CLDFB_NO_CHANNELS_MAX ); mvr2r( renderConfig.room_acoustics.pAcoustic_rt60, hRenderConfig->roomAcoustics.pAcoustic_rt60, CLDFB_NO_CHANNELS_MAX ); mvr2r( renderConfig.room_acoustics.pAcoustic_dsr, hRenderConfig->roomAcoustics.pAcoustic_dsr, CLDFB_NO_CHANNELS_MAX ); #ifdef TD5 mvr2r( renderConfig.directivity, hRenderConfig->directivity, 3 ); #endif return IVAS_ERR_OK; } Loading @@ -3954,9 +3960,18 @@ int16_t IVAS_REND_FeedRenderConfig( * *-------------------------------------------------------------------*/ ivas_error IVAS_REND_SetHeadRotation( #ifdef TD5 ivas_error IVAS_REND_SetHeadRotationAndPosition #else ivas_error IVAS_REND_SetHeadRotation #endif ( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ const IVAS_QUATERNION headRot[RENDERER_HEAD_POSITIONS_PER_FRAME] /* i : head positions for next rendering call */ const IVAS_QUATERNION headRot[RENDERER_HEAD_POSITIONS_PER_FRAME] /* i : head orientations for next rendering call */ #ifdef TD5 , const float headPos[RENDERER_HEAD_POSITIONS_PER_FRAME][3] /* i : head positions for next rendering call */ #endif ) { int16_t i; Loading Loading @@ -3989,6 +4004,27 @@ ivas_error IVAS_REND_SetHeadRotation( } } #ifdef TD5 if ( headPos == NULL ) { for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; ++i ) { hIvasRend->headRotData.Pos[i].x = 0; hIvasRend->headRotData.Pos[i].y = 0; hIvasRend->headRotData.Pos[i].z = 0; }; } else { for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; ++i ) { hIvasRend->headRotData.Pos[i].x = headPos[i][0]; hIvasRend->headRotData.Pos[i].y = headPos[i][1]; hIvasRend->headRotData.Pos[i].z = headPos[i][2]; } } #endif return IVAS_ERR_OK; } Loading lib_rend/lib_rend.h +8 −0 Original line number Diff line number Diff line Loading @@ -246,10 +246,18 @@ int16_t IVAS_REND_FeedRenderConfig( const IVAS_RENDER_CONFIG_DATA renderConfig /* i : Render configuration struct */ ); #ifdef TD5 ivas_error IVAS_REND_SetHeadRotationAndPosition( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ const IVAS_QUATERNION headRot[RENDERER_HEAD_POSITIONS_PER_FRAME], /* i : head orientation for next rendering call */ const float Pos[RENDERER_HEAD_POSITIONS_PER_FRAME][3] /* i : head positions for next rendering call */ ); #else ivas_error IVAS_REND_SetHeadRotation( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ const IVAS_QUATERNION headRot[RENDERER_HEAD_POSITIONS_PER_FRAME] /* i : head positions for next rendering call */ ); #endif ivas_error IVAS_REND_GetSamples( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ Loading Loading
apps/renderer.c +23 −0 Original line number Diff line number Diff line Loading @@ -671,9 +671,17 @@ int main( IVAS_RENDER_CONFIG_DATA renderConfig; /* sanity check */ #ifdef TD5 if ( ( args.outConfig.audioConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL ) && ( args.outConfig.audioConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM ) ) #else if ( args.outConfig.audioConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM ) #endif { #ifdef TD5 fprintf( stderr, "\nExternal Renderer Config is supported only when BINAURAL or BINAURAL_ROOM is used as output. Exiting. \n" ); #else fprintf( stderr, "\nExternal Renderer Config is supported only when BINAURAL_ROOM is used as output. Exiting. \n" ); #endif exit( -1 ); } Loading Loading @@ -910,11 +918,19 @@ int main( #else HeadRotationFileReading( headRotReader, quatBuffer, frame ); #endif #ifdef TD5 IVAS_REND_SetHeadRotationAndPosition( hIvasRend, quatBuffer, Pos ); #else IVAS_REND_SetHeadRotation( hIvasRend, quatBuffer ); #endif } else { #ifdef TD5 IVAS_REND_SetHeadRotationAndPosition( hIvasRend, NULL, NULL ); #else IVAS_REND_SetHeadRotation( hIvasRend, NULL ); #endif } for ( i = 0; i < args.inConfig.numMultiChannelBuses; ++i ) Loading Loading @@ -1744,6 +1760,10 @@ void getMetadataFromFileReader( objectMetadataBuffer->positions[objIdx].azimuth = ismMetadata.azimuth; objectMetadataBuffer->positions[objIdx].elevation = ismMetadata.elevation; #ifdef TD5 objectMetadataBuffer->positions[objIdx].radius = ismMetadata.radius; #endif return; } Loading Loading @@ -1798,6 +1818,9 @@ static void IsmPositionProvider_getNextFrame( { objectMetadataBuffer->positions[objIdx].azimuth = 0.0f; objectMetadataBuffer->positions[objIdx].elevation = 0.0f; #ifdef TD5 objectMetadataBuffer->positions[objIdx].radius = 1.0f; #endif } /* Wrap azimuth to lie within (-180, 180] range */ Loading
lib_com/common_api_types.h +3 −0 Original line number Diff line number Diff line Loading @@ -119,6 +119,9 @@ typedef struct { float azimuth; float elevation; #ifdef TD5 float radius; #endif } IVAS_REND_AudioObjectPosition; typedef struct _IVAS_ROOM_ACOUSTICS_CONFIG Loading
lib_rend/ivas_objectRenderer.c +3 −0 Original line number Diff line number Diff line Loading @@ -800,6 +800,9 @@ ivas_error ivas_td_binaural_renderer_ext( hIsmMetaData[0] = &hIsmMetaDataFrame; hIsmMetaData[0]->azimuth = currentPos->azimuth; hIsmMetaData[0]->elevation = currentPos->elevation; #ifdef TD5 hIsmMetaData[0]->radius = currentPos->radius; #endif } Loading
lib_rend/lib_rend.c +40 −4 Original line number Diff line number Diff line Loading @@ -1009,6 +1009,9 @@ static IVAS_REND_AudioObjectPosition defaultObjectPosition( pos.azimuth = 0.0f; pos.elevation = 0.0f; #ifdef TD5 pos.radius = 0.0f; #endif return pos; } Loading Loading @@ -3943,6 +3946,9 @@ int16_t IVAS_REND_FeedRenderConfig( mvr2r( renderConfig.room_acoustics.pFc_input, hRenderConfig->roomAcoustics.pFc_input, CLDFB_NO_CHANNELS_MAX ); mvr2r( renderConfig.room_acoustics.pAcoustic_rt60, hRenderConfig->roomAcoustics.pAcoustic_rt60, CLDFB_NO_CHANNELS_MAX ); mvr2r( renderConfig.room_acoustics.pAcoustic_dsr, hRenderConfig->roomAcoustics.pAcoustic_dsr, CLDFB_NO_CHANNELS_MAX ); #ifdef TD5 mvr2r( renderConfig.directivity, hRenderConfig->directivity, 3 ); #endif return IVAS_ERR_OK; } Loading @@ -3954,9 +3960,18 @@ int16_t IVAS_REND_FeedRenderConfig( * *-------------------------------------------------------------------*/ ivas_error IVAS_REND_SetHeadRotation( #ifdef TD5 ivas_error IVAS_REND_SetHeadRotationAndPosition #else ivas_error IVAS_REND_SetHeadRotation #endif ( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ const IVAS_QUATERNION headRot[RENDERER_HEAD_POSITIONS_PER_FRAME] /* i : head positions for next rendering call */ const IVAS_QUATERNION headRot[RENDERER_HEAD_POSITIONS_PER_FRAME] /* i : head orientations for next rendering call */ #ifdef TD5 , const float headPos[RENDERER_HEAD_POSITIONS_PER_FRAME][3] /* i : head positions for next rendering call */ #endif ) { int16_t i; Loading Loading @@ -3989,6 +4004,27 @@ ivas_error IVAS_REND_SetHeadRotation( } } #ifdef TD5 if ( headPos == NULL ) { for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; ++i ) { hIvasRend->headRotData.Pos[i].x = 0; hIvasRend->headRotData.Pos[i].y = 0; hIvasRend->headRotData.Pos[i].z = 0; }; } else { for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; ++i ) { hIvasRend->headRotData.Pos[i].x = headPos[i][0]; hIvasRend->headRotData.Pos[i].y = headPos[i][1]; hIvasRend->headRotData.Pos[i].z = headPos[i][2]; } } #endif return IVAS_ERR_OK; } Loading
lib_rend/lib_rend.h +8 −0 Original line number Diff line number Diff line Loading @@ -246,10 +246,18 @@ int16_t IVAS_REND_FeedRenderConfig( const IVAS_RENDER_CONFIG_DATA renderConfig /* i : Render configuration struct */ ); #ifdef TD5 ivas_error IVAS_REND_SetHeadRotationAndPosition( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ const IVAS_QUATERNION headRot[RENDERER_HEAD_POSITIONS_PER_FRAME], /* i : head orientation for next rendering call */ const float Pos[RENDERER_HEAD_POSITIONS_PER_FRAME][3] /* i : head positions for next rendering call */ ); #else ivas_error IVAS_REND_SetHeadRotation( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ const IVAS_QUATERNION headRot[RENDERER_HEAD_POSITIONS_PER_FRAME] /* i : head positions for next rendering call */ ); #endif ivas_error IVAS_REND_GetSamples( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ Loading