Loading apps/renderer.c +12 −0 Original line number Diff line number Diff line Loading @@ -531,6 +531,18 @@ int main( CmdlnArgs args = parseCmdlnArgs( argc, argv ); #ifdef NO_DIEGETIC_PAN if ( ( fabs( args.noDiegeticPan ) <= 1.f ) && ( args.inConfig.multiChannelBuses[0].audioConfig != IVAS_REND_AUDIO_CONFIG_MONO ) && ( args.inConfig.numAudioObjects != 1 ) ) { fprintf( stderr, "invalid configuration no diegetic pan flag required mono input" ); exit( -1 ); } if ( fabs( args.noDiegeticPan ) <= 1.0f ) { args.outConfig.audioConfig = IVAS_REND_AUDIO_CONFIG_STEREO; } #endif positionProvider = IsmPositionProvider_open(); convert_backslash( args.inputFilePath ); Loading lib_rend/ivas_objectRenderer.c +13 −4 Original line number Diff line number Diff line Loading @@ -197,9 +197,18 @@ ivas_error ivas_td_binaural_open_unwrap( if ( ivas_format == ISM_FORMAT ) { DirAtten_p = pBinRendTd->DirAtten_p; if ( directivity != NULL ) { DirAtten_p->ConeInnerAngle = directivity[0]; DirAtten_p->ConeOuterAngle = directivity[1]; DirAtten_p->ConeOuterGain = directivity[2]; } else { DirAtten_p->ConeInnerAngle = 360.0f; DirAtten_p->ConeOuterAngle = 360.0f; DirAtten_p->ConeOuterGain = 1.0f; } for ( nS = 0; nS < nchan_rend; nS++ ) { Loading Loading @@ -716,7 +725,7 @@ ivas_error ivas_td_binaural_open_ext( hTransSetup.ls_elevation = customLsInput->ls_elevation; #ifdef TD5 return ivas_td_binaural_open_unwrap( &pTDRend->hHrtfTD, outFs, nchan_transport, ivas_format, transport_config, hRendCfg->directivity, hTransSetup, &pTDRend->hBinRendererTd, &pTDRend->binaural_latency_ns ); return ivas_td_binaural_open_unwrap( &pTDRend->hHrtfTD, outFs, nchan_transport, ivas_format, transport_config, hRendCfg != NULL ? hRendCfg->directivity : NULL, hTransSetup, &pTDRend->hBinRendererTd, &pTDRend->binaural_latency_ns ); #else return ivas_td_binaural_open_unwrap( &pTDRend->hHrtfTD, outFs, nchan_transport, ivas_format, transport_config, hTransSetup, &pTDRend->hBinRendererTd, &pTDRend->binaural_latency_ns ); #endif Loading lib_rend/lib_rend.c +31 −11 Original line number Diff line number Diff line Loading @@ -124,6 +124,9 @@ typedef struct CREND_WRAPPER crendWrapper; #endif rotation_matrix rot_mat_prev; #ifdef NO_DIEGETIC_PAN float noDiegeticPan; #endif } input_ism; typedef struct Loading Loading @@ -2746,6 +2749,7 @@ ivas_error IVAS_REND_Open( { return error; } if ( ( error = validateOutputSampleRate( outputSampleRate, outConfig ) ) != IVAS_ERR_OK ) { return error; Loading Loading @@ -2794,6 +2798,9 @@ ivas_error IVAS_REND_Open( hIvasRend->inputsIsm[i].reverb = NULL; #endif hIvasRend->inputsIsm[i].tdRendWrapper.hBinRendererTd = NULL; #ifdef NO_DIEGETIC_PAN hIvasRend->inputsIsm[i].noDiegeticPan = noDiegeticPan; #endif } for ( i = 0; i < RENDERER_MAX_MC_INPUTS; ++i ) { Loading Loading @@ -4492,6 +4499,16 @@ static ivas_error renderIsmToMc( /* TODO(sgi): Possible optimization: less processing needed if position didn't change */ if ( *ismInput->base.ctx.pOutConfig == IVAS_REND_AUDIO_CONFIG_STEREO ) { #ifdef NO_DIEGETIC_PAN if ( fabs( ismInput->noDiegeticPan ) <= 1.f ) { previousPanGains[0] = currentPanGains[0] = ( ismInput->noDiegeticPan + 1.f ) * 0.5f; previousPanGains[1] = currentPanGains[1] = 1.f - currentPanGains[0]; error = IVAS_ERR_OK; } else { #endif set_zero( currentPanGains, 16 ); ivas_ism_get_stereo_gains( ismInput->currentPos.azimuth, ismInput->currentPos.elevation, Loading @@ -4503,6 +4520,9 @@ static ivas_error renderIsmToMc( ismInput->previousPos.elevation, &previousPanGains[0], &previousPanGains[1] ); #ifdef NO_DIEGETIC_PAN } #endif } else { Loading Loading
apps/renderer.c +12 −0 Original line number Diff line number Diff line Loading @@ -531,6 +531,18 @@ int main( CmdlnArgs args = parseCmdlnArgs( argc, argv ); #ifdef NO_DIEGETIC_PAN if ( ( fabs( args.noDiegeticPan ) <= 1.f ) && ( args.inConfig.multiChannelBuses[0].audioConfig != IVAS_REND_AUDIO_CONFIG_MONO ) && ( args.inConfig.numAudioObjects != 1 ) ) { fprintf( stderr, "invalid configuration no diegetic pan flag required mono input" ); exit( -1 ); } if ( fabs( args.noDiegeticPan ) <= 1.0f ) { args.outConfig.audioConfig = IVAS_REND_AUDIO_CONFIG_STEREO; } #endif positionProvider = IsmPositionProvider_open(); convert_backslash( args.inputFilePath ); Loading
lib_rend/ivas_objectRenderer.c +13 −4 Original line number Diff line number Diff line Loading @@ -197,9 +197,18 @@ ivas_error ivas_td_binaural_open_unwrap( if ( ivas_format == ISM_FORMAT ) { DirAtten_p = pBinRendTd->DirAtten_p; if ( directivity != NULL ) { DirAtten_p->ConeInnerAngle = directivity[0]; DirAtten_p->ConeOuterAngle = directivity[1]; DirAtten_p->ConeOuterGain = directivity[2]; } else { DirAtten_p->ConeInnerAngle = 360.0f; DirAtten_p->ConeOuterAngle = 360.0f; DirAtten_p->ConeOuterGain = 1.0f; } for ( nS = 0; nS < nchan_rend; nS++ ) { Loading Loading @@ -716,7 +725,7 @@ ivas_error ivas_td_binaural_open_ext( hTransSetup.ls_elevation = customLsInput->ls_elevation; #ifdef TD5 return ivas_td_binaural_open_unwrap( &pTDRend->hHrtfTD, outFs, nchan_transport, ivas_format, transport_config, hRendCfg->directivity, hTransSetup, &pTDRend->hBinRendererTd, &pTDRend->binaural_latency_ns ); return ivas_td_binaural_open_unwrap( &pTDRend->hHrtfTD, outFs, nchan_transport, ivas_format, transport_config, hRendCfg != NULL ? hRendCfg->directivity : NULL, hTransSetup, &pTDRend->hBinRendererTd, &pTDRend->binaural_latency_ns ); #else return ivas_td_binaural_open_unwrap( &pTDRend->hHrtfTD, outFs, nchan_transport, ivas_format, transport_config, hTransSetup, &pTDRend->hBinRendererTd, &pTDRend->binaural_latency_ns ); #endif Loading
lib_rend/lib_rend.c +31 −11 Original line number Diff line number Diff line Loading @@ -124,6 +124,9 @@ typedef struct CREND_WRAPPER crendWrapper; #endif rotation_matrix rot_mat_prev; #ifdef NO_DIEGETIC_PAN float noDiegeticPan; #endif } input_ism; typedef struct Loading Loading @@ -2746,6 +2749,7 @@ ivas_error IVAS_REND_Open( { return error; } if ( ( error = validateOutputSampleRate( outputSampleRate, outConfig ) ) != IVAS_ERR_OK ) { return error; Loading Loading @@ -2794,6 +2798,9 @@ ivas_error IVAS_REND_Open( hIvasRend->inputsIsm[i].reverb = NULL; #endif hIvasRend->inputsIsm[i].tdRendWrapper.hBinRendererTd = NULL; #ifdef NO_DIEGETIC_PAN hIvasRend->inputsIsm[i].noDiegeticPan = noDiegeticPan; #endif } for ( i = 0; i < RENDERER_MAX_MC_INPUTS; ++i ) { Loading Loading @@ -4492,6 +4499,16 @@ static ivas_error renderIsmToMc( /* TODO(sgi): Possible optimization: less processing needed if position didn't change */ if ( *ismInput->base.ctx.pOutConfig == IVAS_REND_AUDIO_CONFIG_STEREO ) { #ifdef NO_DIEGETIC_PAN if ( fabs( ismInput->noDiegeticPan ) <= 1.f ) { previousPanGains[0] = currentPanGains[0] = ( ismInput->noDiegeticPan + 1.f ) * 0.5f; previousPanGains[1] = currentPanGains[1] = 1.f - currentPanGains[0]; error = IVAS_ERR_OK; } else { #endif set_zero( currentPanGains, 16 ); ivas_ism_get_stereo_gains( ismInput->currentPos.azimuth, ismInput->currentPos.elevation, Loading @@ -4503,6 +4520,9 @@ static ivas_error renderIsmToMc( ismInput->previousPos.elevation, &previousPanGains[0], &previousPanGains[1] ); #ifdef NO_DIEGETIC_PAN } #endif } else { Loading