Loading apps/renderer.c +18 −4 Original line number Diff line number Diff line Loading @@ -1257,8 +1257,8 @@ int main( /* Set up output custom layout configuration */ if ( args.outConfig.audioConfig == IVAS_AUDIO_CONFIG_LS_CUSTOM ) { floatToFixed_arrL_app( args.outConfig.outSetupCustom.azimuth, args.outConfig.outSetupCustom.azimuth_fx, Q22, RENDERER_MAX_OUTPUT_CHANNELS ); floatToFixed_arrL_app( args.outConfig.outSetupCustom.elevation, args.outConfig.outSetupCustom.elevation_fx, Q22, RENDERER_MAX_OUTPUT_CHANNELS ); floatToFixed_arrL_app( args.outConfig.outSetupCustom.azimuth, args.outConfig.outSetupCustom.azimuth_fx, Q22, args.outConfig.outSetupCustom.num_spk ); floatToFixed_arrL_app( args.outConfig.outSetupCustom.elevation, args.outConfig.outSetupCustom.elevation_fx, Q22, args.outConfig.outSetupCustom.num_spk ); if ( ( error = IVAS_REND_ConfigureCustomOutputLoudspeakerLayout( hIvasRend, args.outConfig.outSetupCustom ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_REND_ConfigureCustomOutputLoudspeakerLayout(): %s\n", ivas_error_to_string( error ) ); Loading Loading @@ -1362,8 +1362,8 @@ int main( if ( args.inConfig.multiChannelBuses[i].audioConfig == IVAS_AUDIO_CONFIG_LS_CUSTOM ) { floatToFixed_arrL_app( args.inConfig.inSetupCustom.azimuth, args.inConfig.inSetupCustom.azimuth_fx, Q22, RENDERER_MAX_OUTPUT_CHANNELS ); floatToFixed_arrL_app( args.inConfig.inSetupCustom.elevation, args.inConfig.inSetupCustom.elevation_fx, Q22, RENDERER_MAX_OUTPUT_CHANNELS ); floatToFixed_arrL_app( args.inConfig.inSetupCustom.azimuth, args.inConfig.inSetupCustom.azimuth_fx, Q22, args.inConfig.inSetupCustom.num_spk ); floatToFixed_arrL_app( args.inConfig.inSetupCustom.elevation, args.inConfig.inSetupCustom.elevation_fx, Q22, args.inConfig.inSetupCustom.num_spk ); if ( ( error = IVAS_REND_ConfigureCustomInputLoudspeakerLayout( hIvasRend, mcIds[i], args.inConfig.inSetupCustom ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_REND_ConfigureCustomInputLoudspeakerLayout(): %s\n", ivas_error_to_string( error ) ); Loading Loading @@ -2763,6 +2763,13 @@ static CmdlnArgs defaultArgs( args.inConfig.inSetupCustom.num_spk = 0; args.inConfig.inSetupCustom.num_lfe = 0; for ( i = 0; i < RENDERER_MAX_INPUT_CHANNELS; i++ ) { args.inConfig.inSetupCustom.azimuth[i] = 0.f; args.inConfig.inSetupCustom.azimuth_fx[i] = 0; args.inConfig.inSetupCustom.elevation[i] = 0.f; args.inConfig.inSetupCustom.elevation_fx[i] = 0; } args.inConfig.numAudioObjects = 0; args.inConfig.numAmbisonicsBuses = 0; args.inConfig.numMultiChannelBuses = 0; Loading @@ -2771,6 +2778,13 @@ static CmdlnArgs defaultArgs( args.outConfig.audioConfig = IVAS_AUDIO_CONFIG_INVALID; args.outConfig.outSetupCustom.num_spk = 0; args.outConfig.outSetupCustom.num_lfe = 0; for ( i = 0; i < RENDERER_MAX_OUTPUT_CHANNELS; i++ ) { args.outConfig.outSetupCustom.azimuth[i] = 0.f; args.outConfig.outSetupCustom.azimuth_fx[i] = 0; args.outConfig.outSetupCustom.elevation[i] = 0.f; args.outConfig.outSetupCustom.elevation_fx[i] = 0; } for ( i = 0; i < RENDERER_MAX_SBA_INPUTS; ++i ) { args.inConfig.ambisonicsBuses[i].audioConfig = IVAS_AUDIO_CONFIG_INVALID; Loading lib_util/render_config_reader.c +2 −0 Original line number Diff line number Diff line Loading @@ -1997,7 +1997,9 @@ ivas_error RenderConfigReader_read( pTemp = (char *) calloc( file_size + 1, sizeof( char ) ); acIdx = 0; roomAcHasFgCount = roomAcHasAcEnvCount = FALSE; #ifdef _MSC_VER setvbuf( pRenderConfigReader->pConfigFile, pConfig_str, _IONBF, sizeof( char ) ); /* Work-around for VS bug that gives incorrect ftell for UNIX-style line endings */ #endif /* read file line by line */ while ( fgets( pConfig_str, file_size, pRenderConfigReader->pConfigFile ) != NULL ) Loading lib_util/split_render_file_read_write.c +11 −4 Original line number Diff line number Diff line Loading @@ -71,6 +71,7 @@ ivas_error split_rend_reader_open( { SplitFileReadWrite *hSplitRendFileReadWrite; size_t header_len, h; int32_t tmp; char header[SPLIT_RENDERER_FRAME_HEADER_LEN] = "MAIN_SPLITH"; char header_read[SPLIT_RENDERER_FRAME_HEADER_LEN]; Loading Loading @@ -104,16 +105,19 @@ ivas_error split_rend_reader_open( fread( &hSplitRendFileReadWrite->delay_ns, sizeof( uint32_t ), 1, hSplitRendFileReadWrite->file ); /* read codec signalling */ if ( fread( codec, sizeof( *codec ), 1, hSplitRendFileReadWrite->file ) != 1 ) if ( fread( &tmp, sizeof( int32_t ), 1, hSplitRendFileReadWrite->file ) != 1 ) { return IVAS_ERR_FAILED_FILE_READ; } *codec = (ISAR_SPLIT_REND_CODEC) tmp; /* read pose correction signalling */ if ( fread( poseCorrection, sizeof( *poseCorrection ), 1, hSplitRendFileReadWrite->file ) != 1 ) if ( fread( &tmp, sizeof( int32_t ), 1, hSplitRendFileReadWrite->file ) != 1 ) { return IVAS_ERR_FAILED_FILE_READ; } *poseCorrection = (ISAR_SPLIT_REND_POSE_CORRECTION_MODE) tmp; /* read transport codec frame size signalling */ if ( fread( codec_frame_size_ms, sizeof( *codec_frame_size_ms ), 1, hSplitRendFileReadWrite->file ) != 1 ) { Loading Loading @@ -161,6 +165,7 @@ ivas_error split_rend_writer_open( { SplitFileReadWrite *hSplitRendFileReadWrite; size_t header_len, h; int32_t tmp; char header[SPLIT_RENDERER_FRAME_HEADER_LEN] = "MAIN_SPLITH"; if ( filename == NULL ) Loading Loading @@ -193,13 +198,15 @@ ivas_error split_rend_writer_open( fwrite( &hSplitRendFileReadWrite->delay_ns, sizeof( int32_t ), 1, hSplitRendFileReadWrite->file ); /* Write codec signalling */ if ( fwrite( &codec, sizeof( codec ), 1, hSplitRendFileReadWrite->file ) != 1 ) tmp = (int32_t) codec; if ( fwrite( &tmp, sizeof( int32_t ), 1, hSplitRendFileReadWrite->file ) != 1 ) { return IVAS_ERR_FAILED_FILE_WRITE; } /* Write pose correction signalling */ if ( fwrite( &poseCorrection, sizeof( poseCorrection ), 1, hSplitRendFileReadWrite->file ) != 1 ) tmp = (int32_t) poseCorrection; if ( fwrite( &tmp, sizeof( int32_t ), 1, hSplitRendFileReadWrite->file ) != 1 ) { return IVAS_ERR_FAILED_FILE_WRITE; } Loading Loading
apps/renderer.c +18 −4 Original line number Diff line number Diff line Loading @@ -1257,8 +1257,8 @@ int main( /* Set up output custom layout configuration */ if ( args.outConfig.audioConfig == IVAS_AUDIO_CONFIG_LS_CUSTOM ) { floatToFixed_arrL_app( args.outConfig.outSetupCustom.azimuth, args.outConfig.outSetupCustom.azimuth_fx, Q22, RENDERER_MAX_OUTPUT_CHANNELS ); floatToFixed_arrL_app( args.outConfig.outSetupCustom.elevation, args.outConfig.outSetupCustom.elevation_fx, Q22, RENDERER_MAX_OUTPUT_CHANNELS ); floatToFixed_arrL_app( args.outConfig.outSetupCustom.azimuth, args.outConfig.outSetupCustom.azimuth_fx, Q22, args.outConfig.outSetupCustom.num_spk ); floatToFixed_arrL_app( args.outConfig.outSetupCustom.elevation, args.outConfig.outSetupCustom.elevation_fx, Q22, args.outConfig.outSetupCustom.num_spk ); if ( ( error = IVAS_REND_ConfigureCustomOutputLoudspeakerLayout( hIvasRend, args.outConfig.outSetupCustom ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_REND_ConfigureCustomOutputLoudspeakerLayout(): %s\n", ivas_error_to_string( error ) ); Loading Loading @@ -1362,8 +1362,8 @@ int main( if ( args.inConfig.multiChannelBuses[i].audioConfig == IVAS_AUDIO_CONFIG_LS_CUSTOM ) { floatToFixed_arrL_app( args.inConfig.inSetupCustom.azimuth, args.inConfig.inSetupCustom.azimuth_fx, Q22, RENDERER_MAX_OUTPUT_CHANNELS ); floatToFixed_arrL_app( args.inConfig.inSetupCustom.elevation, args.inConfig.inSetupCustom.elevation_fx, Q22, RENDERER_MAX_OUTPUT_CHANNELS ); floatToFixed_arrL_app( args.inConfig.inSetupCustom.azimuth, args.inConfig.inSetupCustom.azimuth_fx, Q22, args.inConfig.inSetupCustom.num_spk ); floatToFixed_arrL_app( args.inConfig.inSetupCustom.elevation, args.inConfig.inSetupCustom.elevation_fx, Q22, args.inConfig.inSetupCustom.num_spk ); if ( ( error = IVAS_REND_ConfigureCustomInputLoudspeakerLayout( hIvasRend, mcIds[i], args.inConfig.inSetupCustom ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_REND_ConfigureCustomInputLoudspeakerLayout(): %s\n", ivas_error_to_string( error ) ); Loading Loading @@ -2763,6 +2763,13 @@ static CmdlnArgs defaultArgs( args.inConfig.inSetupCustom.num_spk = 0; args.inConfig.inSetupCustom.num_lfe = 0; for ( i = 0; i < RENDERER_MAX_INPUT_CHANNELS; i++ ) { args.inConfig.inSetupCustom.azimuth[i] = 0.f; args.inConfig.inSetupCustom.azimuth_fx[i] = 0; args.inConfig.inSetupCustom.elevation[i] = 0.f; args.inConfig.inSetupCustom.elevation_fx[i] = 0; } args.inConfig.numAudioObjects = 0; args.inConfig.numAmbisonicsBuses = 0; args.inConfig.numMultiChannelBuses = 0; Loading @@ -2771,6 +2778,13 @@ static CmdlnArgs defaultArgs( args.outConfig.audioConfig = IVAS_AUDIO_CONFIG_INVALID; args.outConfig.outSetupCustom.num_spk = 0; args.outConfig.outSetupCustom.num_lfe = 0; for ( i = 0; i < RENDERER_MAX_OUTPUT_CHANNELS; i++ ) { args.outConfig.outSetupCustom.azimuth[i] = 0.f; args.outConfig.outSetupCustom.azimuth_fx[i] = 0; args.outConfig.outSetupCustom.elevation[i] = 0.f; args.outConfig.outSetupCustom.elevation_fx[i] = 0; } for ( i = 0; i < RENDERER_MAX_SBA_INPUTS; ++i ) { args.inConfig.ambisonicsBuses[i].audioConfig = IVAS_AUDIO_CONFIG_INVALID; Loading
lib_util/render_config_reader.c +2 −0 Original line number Diff line number Diff line Loading @@ -1997,7 +1997,9 @@ ivas_error RenderConfigReader_read( pTemp = (char *) calloc( file_size + 1, sizeof( char ) ); acIdx = 0; roomAcHasFgCount = roomAcHasAcEnvCount = FALSE; #ifdef _MSC_VER setvbuf( pRenderConfigReader->pConfigFile, pConfig_str, _IONBF, sizeof( char ) ); /* Work-around for VS bug that gives incorrect ftell for UNIX-style line endings */ #endif /* read file line by line */ while ( fgets( pConfig_str, file_size, pRenderConfigReader->pConfigFile ) != NULL ) Loading
lib_util/split_render_file_read_write.c +11 −4 Original line number Diff line number Diff line Loading @@ -71,6 +71,7 @@ ivas_error split_rend_reader_open( { SplitFileReadWrite *hSplitRendFileReadWrite; size_t header_len, h; int32_t tmp; char header[SPLIT_RENDERER_FRAME_HEADER_LEN] = "MAIN_SPLITH"; char header_read[SPLIT_RENDERER_FRAME_HEADER_LEN]; Loading Loading @@ -104,16 +105,19 @@ ivas_error split_rend_reader_open( fread( &hSplitRendFileReadWrite->delay_ns, sizeof( uint32_t ), 1, hSplitRendFileReadWrite->file ); /* read codec signalling */ if ( fread( codec, sizeof( *codec ), 1, hSplitRendFileReadWrite->file ) != 1 ) if ( fread( &tmp, sizeof( int32_t ), 1, hSplitRendFileReadWrite->file ) != 1 ) { return IVAS_ERR_FAILED_FILE_READ; } *codec = (ISAR_SPLIT_REND_CODEC) tmp; /* read pose correction signalling */ if ( fread( poseCorrection, sizeof( *poseCorrection ), 1, hSplitRendFileReadWrite->file ) != 1 ) if ( fread( &tmp, sizeof( int32_t ), 1, hSplitRendFileReadWrite->file ) != 1 ) { return IVAS_ERR_FAILED_FILE_READ; } *poseCorrection = (ISAR_SPLIT_REND_POSE_CORRECTION_MODE) tmp; /* read transport codec frame size signalling */ if ( fread( codec_frame_size_ms, sizeof( *codec_frame_size_ms ), 1, hSplitRendFileReadWrite->file ) != 1 ) { Loading Loading @@ -161,6 +165,7 @@ ivas_error split_rend_writer_open( { SplitFileReadWrite *hSplitRendFileReadWrite; size_t header_len, h; int32_t tmp; char header[SPLIT_RENDERER_FRAME_HEADER_LEN] = "MAIN_SPLITH"; if ( filename == NULL ) Loading Loading @@ -193,13 +198,15 @@ ivas_error split_rend_writer_open( fwrite( &hSplitRendFileReadWrite->delay_ns, sizeof( int32_t ), 1, hSplitRendFileReadWrite->file ); /* Write codec signalling */ if ( fwrite( &codec, sizeof( codec ), 1, hSplitRendFileReadWrite->file ) != 1 ) tmp = (int32_t) codec; if ( fwrite( &tmp, sizeof( int32_t ), 1, hSplitRendFileReadWrite->file ) != 1 ) { return IVAS_ERR_FAILED_FILE_WRITE; } /* Write pose correction signalling */ if ( fwrite( &poseCorrection, sizeof( poseCorrection ), 1, hSplitRendFileReadWrite->file ) != 1 ) tmp = (int32_t) poseCorrection; if ( fwrite( &tmp, sizeof( int32_t ), 1, hSplitRendFileReadWrite->file ) != 1 ) { return IVAS_ERR_FAILED_FILE_WRITE; } Loading