Loading apps/renderer.c +32 −7 Original line number Diff line number Diff line Loading @@ -654,6 +654,7 @@ int main( /* === Configure === */ if ( ( error = IVAS_REND_InitConfig( hIvasRend, strlen( args.renderConfigFilePath ) != 0 ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error in Renderer Config Init\n" ); exit( -1 ); } Loading Loading @@ -861,7 +862,7 @@ int main( if ( !args.quietModeEnabled ) { fprintf( stdout, "\n------ Running the renderer ------\n\n" ); fprintf( stdout, "\n------ Running the rondoror ------\n\n" ); fprintf( stdout, "Frames processed: " ); } else Loading Loading @@ -901,16 +902,28 @@ int main( #ifdef FIX_I109_ORIENTATION_TRACKING for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; i++ ) { HeadRotationFileReading( headRotReader, &quatBuffer[i] ); if ( HeadRotationFileReading( headRotReader, &quatBuffer[i] ) != IVAS_ERR_OK ) { fprintf(stderr, "Error in Head Rotation File Reading.\r\n"); exit(-1); } } #else HeadRotationFileReading( headRotReader, quatBuffer, frame ); #endif IVAS_REND_SetHeadRotation( hIvasRend, quatBuffer ); if ( IVAS_REND_SetHeadRotation( hIvasRend, quatBuffer ) != IVAS_ERR_OK ) { fprintf( stderr, "Error setting Head Rotation\n" ); exit(-1); } } else { IVAS_REND_SetHeadRotation( hIvasRend, NULL ); if ( ( IVAS_REND_SetHeadRotation( hIvasRend, NULL ) != IVAS_ERR_OK ) && ( IVAS_REND_SetHeadRotation( hIvasRend, NULL ) != IVAS_ERR_INVALID_OUTPUT_FORMAT) ) { fprintf( stderr, "Error setting Head Rotation\n" ); exit(-1); } } #ifdef FIX_I109_ORIENTATION_TRACKING Loading @@ -918,8 +931,16 @@ int main( if ( referenceRotReader != NULL ) { IVAS_QUATERNION quaternion; HeadRotationFileReading( referenceRotReader, &quaternion ); IVAS_REND_SetReferenceRotation( hIvasRend, quaternion ); if ( HeadRotationFileReading( referenceRotReader, &quaternion ) != IVAS_ERR_OK ) { fprintf(stderr, "Error in Head Rotation File Reading.\r\n"); exit(-1); } if ( IVAS_REND_SetReferenceRotation( hIvasRend, quaternion ) != IVAS_ERR_OK ) { fprintf(stderr, "Error setting Reference Rotation.\r\n"); exit(-1); } } #endif Loading Loading @@ -1000,7 +1021,11 @@ int main( } } IVAS_REND_GetSamples( hIvasRend, outBuffer ); if ( IVAS_REND_GetSamples( hIvasRend, outBuffer ) != IVAS_ERR_OK ) { fprintf(stderr, "Error in getting samples\n"); exit( -1 ); } int16_t num_out_channels; num_out_channels = outBuffer.config.numChannels; Loading lib_rend/ivas_hrtf.c +0 −36 Original line number Diff line number Diff line Loading @@ -203,39 +203,3 @@ void ivas_HRTF_parambin_binary_close( return; } #ifndef FIX_I109_ORIENTATION_TRACKING /*-----------------------------------------------------------------------* * ivas_headTrack_open() * * Allocate and initialize Head-Tracking handle *-----------------------------------------------------------------------*/ ivas_error ivas_headTrack_open( HEAD_TRACK_DATA_HANDLE *hHeadTrackData /* o : head track handle */ ) { int16_t i; /* Allocate Head-Tracking handle */ if ( ( *hHeadTrackData = (HEAD_TRACK_DATA_HANDLE) malloc( sizeof( HEAD_TRACK_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for head-tracking memory\n" ) ); } /* Initialization */ ( *hHeadTrackData )->num_quaternions = 0; ( *hHeadTrackData )->lrSwitchInterpVal = 0.0f; ( *hHeadTrackData )->lrSwitchedCurrent = 0; ( *hHeadTrackData )->lrSwitchedNext = 0; /* Initialise Rmat_prev to I, Rmat will be computed later */ for ( i = 0; i < 3; i++ ) { set_zero( ( *hHeadTrackData )->Rmat_prev[i], 3 ); ( *hHeadTrackData )->Rmat_prev[i][i] = 1.0f; } return IVAS_ERR_OK; } #endif lib_rend/ivas_stat_rend.h +0 −30 Original line number Diff line number Diff line Loading @@ -410,36 +410,6 @@ typedef struct ivas_reverb_state_t } REVERB_DATA, *REVERB_HANDLE; #ifndef FIX_I109_ORIENTATION_TRACKING typedef struct ivas_orient_trk_state_t { OTR_TRACKING_T trackingType; float centerAdaptationRate; float offCenterAdaptationRate; float adaptationAngle; float alpha; float absYaw; /* absolute orientation */ float absPitch; float absRoll; float absAvgYaw; /* average absolute orientation */ float absAvgPitch; float absAvgRoll; float refYaw; /* reference orientation */ float refPitch; float refRoll; float trkYaw; /* tracked orientation */ float trkPitch; float trkRoll; } ivas_orient_trk_state_t; #endif /*----------------------------------------------------------------------------------* * TD ISm Object Renderer structure Loading lib_rend/lib_rend.c +1 −1 Original line number Diff line number Diff line Loading @@ -3912,7 +3912,7 @@ ivas_error IVAS_REND_SetHeadRotation( if ( getAudioConfigType( hIvasRend->outputConfig ) != IVAS_REND_AUDIO_CONFIG_TYPE_BINAURAL ) { /* Head rotation can be set only with binaural output */ return IVAS_ERR_METADATA_NOT_EXPECTED; return IVAS_ERR_INVALID_OUTPUT_FORMAT; } if ( headRot == NULL ) Loading Loading
apps/renderer.c +32 −7 Original line number Diff line number Diff line Loading @@ -654,6 +654,7 @@ int main( /* === Configure === */ if ( ( error = IVAS_REND_InitConfig( hIvasRend, strlen( args.renderConfigFilePath ) != 0 ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error in Renderer Config Init\n" ); exit( -1 ); } Loading Loading @@ -861,7 +862,7 @@ int main( if ( !args.quietModeEnabled ) { fprintf( stdout, "\n------ Running the renderer ------\n\n" ); fprintf( stdout, "\n------ Running the rondoror ------\n\n" ); fprintf( stdout, "Frames processed: " ); } else Loading Loading @@ -901,16 +902,28 @@ int main( #ifdef FIX_I109_ORIENTATION_TRACKING for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; i++ ) { HeadRotationFileReading( headRotReader, &quatBuffer[i] ); if ( HeadRotationFileReading( headRotReader, &quatBuffer[i] ) != IVAS_ERR_OK ) { fprintf(stderr, "Error in Head Rotation File Reading.\r\n"); exit(-1); } } #else HeadRotationFileReading( headRotReader, quatBuffer, frame ); #endif IVAS_REND_SetHeadRotation( hIvasRend, quatBuffer ); if ( IVAS_REND_SetHeadRotation( hIvasRend, quatBuffer ) != IVAS_ERR_OK ) { fprintf( stderr, "Error setting Head Rotation\n" ); exit(-1); } } else { IVAS_REND_SetHeadRotation( hIvasRend, NULL ); if ( ( IVAS_REND_SetHeadRotation( hIvasRend, NULL ) != IVAS_ERR_OK ) && ( IVAS_REND_SetHeadRotation( hIvasRend, NULL ) != IVAS_ERR_INVALID_OUTPUT_FORMAT) ) { fprintf( stderr, "Error setting Head Rotation\n" ); exit(-1); } } #ifdef FIX_I109_ORIENTATION_TRACKING Loading @@ -918,8 +931,16 @@ int main( if ( referenceRotReader != NULL ) { IVAS_QUATERNION quaternion; HeadRotationFileReading( referenceRotReader, &quaternion ); IVAS_REND_SetReferenceRotation( hIvasRend, quaternion ); if ( HeadRotationFileReading( referenceRotReader, &quaternion ) != IVAS_ERR_OK ) { fprintf(stderr, "Error in Head Rotation File Reading.\r\n"); exit(-1); } if ( IVAS_REND_SetReferenceRotation( hIvasRend, quaternion ) != IVAS_ERR_OK ) { fprintf(stderr, "Error setting Reference Rotation.\r\n"); exit(-1); } } #endif Loading Loading @@ -1000,7 +1021,11 @@ int main( } } IVAS_REND_GetSamples( hIvasRend, outBuffer ); if ( IVAS_REND_GetSamples( hIvasRend, outBuffer ) != IVAS_ERR_OK ) { fprintf(stderr, "Error in getting samples\n"); exit( -1 ); } int16_t num_out_channels; num_out_channels = outBuffer.config.numChannels; Loading
lib_rend/ivas_hrtf.c +0 −36 Original line number Diff line number Diff line Loading @@ -203,39 +203,3 @@ void ivas_HRTF_parambin_binary_close( return; } #ifndef FIX_I109_ORIENTATION_TRACKING /*-----------------------------------------------------------------------* * ivas_headTrack_open() * * Allocate and initialize Head-Tracking handle *-----------------------------------------------------------------------*/ ivas_error ivas_headTrack_open( HEAD_TRACK_DATA_HANDLE *hHeadTrackData /* o : head track handle */ ) { int16_t i; /* Allocate Head-Tracking handle */ if ( ( *hHeadTrackData = (HEAD_TRACK_DATA_HANDLE) malloc( sizeof( HEAD_TRACK_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for head-tracking memory\n" ) ); } /* Initialization */ ( *hHeadTrackData )->num_quaternions = 0; ( *hHeadTrackData )->lrSwitchInterpVal = 0.0f; ( *hHeadTrackData )->lrSwitchedCurrent = 0; ( *hHeadTrackData )->lrSwitchedNext = 0; /* Initialise Rmat_prev to I, Rmat will be computed later */ for ( i = 0; i < 3; i++ ) { set_zero( ( *hHeadTrackData )->Rmat_prev[i], 3 ); ( *hHeadTrackData )->Rmat_prev[i][i] = 1.0f; } return IVAS_ERR_OK; } #endif
lib_rend/ivas_stat_rend.h +0 −30 Original line number Diff line number Diff line Loading @@ -410,36 +410,6 @@ typedef struct ivas_reverb_state_t } REVERB_DATA, *REVERB_HANDLE; #ifndef FIX_I109_ORIENTATION_TRACKING typedef struct ivas_orient_trk_state_t { OTR_TRACKING_T trackingType; float centerAdaptationRate; float offCenterAdaptationRate; float adaptationAngle; float alpha; float absYaw; /* absolute orientation */ float absPitch; float absRoll; float absAvgYaw; /* average absolute orientation */ float absAvgPitch; float absAvgRoll; float refYaw; /* reference orientation */ float refPitch; float refRoll; float trkYaw; /* tracked orientation */ float trkPitch; float trkRoll; } ivas_orient_trk_state_t; #endif /*----------------------------------------------------------------------------------* * TD ISm Object Renderer structure Loading
lib_rend/lib_rend.c +1 −1 Original line number Diff line number Diff line Loading @@ -3912,7 +3912,7 @@ ivas_error IVAS_REND_SetHeadRotation( if ( getAudioConfigType( hIvasRend->outputConfig ) != IVAS_REND_AUDIO_CONFIG_TYPE_BINAURAL ) { /* Head rotation can be set only with binaural output */ return IVAS_ERR_METADATA_NOT_EXPECTED; return IVAS_ERR_INVALID_OUTPUT_FORMAT; } if ( headRot == NULL ) Loading