Commit 7b85b968 authored by Marek Szczerba's avatar Marek Szczerba
Browse files

Support for output of main orientation, tracked rotation, and combined...

Support for output of main orientation, tracked rotation, and combined orientation vectors using command line
parent 217f6125
Loading
Loading
Loading
Loading
+17 −8
Original line number Diff line number Diff line
@@ -178,14 +178,14 @@ typedef struct
    char externalOrientationFilePath[RENDERER_MAX_CLI_ARG_LENGTH];
    char customHrtfFilePath[RENDERER_MAX_CLI_ARG_LENGTH];
    char renderConfigFilePath[RENDERER_MAX_CLI_ARG_LENGTH];
    int8_t orientation_tracking;
    int16_t nonDiegeticPan;
    float nonDiegeticPanGain;
#ifdef FIX_1066_ORIENTATION_OUTPUT_FUNCTIONS
    char mainOrientationOutputFilePath[RENDERER_MAX_CLI_ARG_LENGTH];
    char trackedOrientationOutputFilePath[RENDERER_MAX_CLI_ARG_LENGTH];
    char combinedOrientationOutputFilePath[RENDERER_MAX_CLI_ARG_LENGTH];
#endif
    int8_t orientation_tracking;
    int16_t nonDiegeticPan;
    float nonDiegeticPanGain;
    IVAS_REND_COMPLEXITY_LEVEL complexityLevel;
    bool delayCompensationEnabled;
    bool quietModeEnabled;
@@ -831,6 +831,11 @@ int main(
    convert_backslash( args.referenceRotationFilePath );
    convert_backslash( args.inLfePanningMatrixFile );
    convert_backslash( args.externalOrientationFilePath );
#ifdef FIX_1066_ORIENTATION_OUTPUT_FUNCTIONS
    convert_backslash( args.mainOrientationOutputFilePath );
    convert_backslash( args.trackedOrientationOutputFilePath );
    convert_backslash( args.combinedOrientationOutputFilePath );
#endif

        if ( !isEmptyString( args.headRotationFilePath ) )
    {
@@ -877,7 +882,6 @@ int main(
#ifdef FIX_1066_ORIENTATION_OUTPUT_FUNCTIONS
    if ( !isEmptyString( args.mainOrientationOutputFilePath ) )
    {
        convert_backslash( args.mainOrientationOutputFilePath );
        if ( RotationFileWriter_open( args.mainOrientationOutputFilePath, &mainOrientationFileWriter ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "Error opening file: %s\n", args.mainOrientationOutputFilePath );
@@ -887,7 +891,6 @@ int main(

    if ( !isEmptyString( args.trackedOrientationOutputFilePath ) )
    {
        convert_backslash( args.trackedOrientationOutputFilePath );
        if ( RotationFileWriter_open( args.trackedOrientationOutputFilePath, &trackedRotationFileWriter ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "Error opening file: %s\n", args.trackedOrientationOutputFilePath );
@@ -897,7 +900,6 @@ int main(

    if ( !isEmptyString( args.combinedOrientationOutputFilePath ) )
    {
        convert_backslash( args.combinedOrientationOutputFilePath );
        if ( RotationFileWriter_open( args.combinedOrientationOutputFilePath, &combinedOrientationFileWriter ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "Error opening file: %s\n", args.combinedOrientationOutputFilePath );
@@ -2814,6 +2816,12 @@ static CmdlnArgs defaultArgs(
    clearString( args.renderConfigFilePath );
    clearString( args.externalOrientationFilePath );

#ifdef FIX_1066_ORIENTATION_OUTPUT_FUNCTIONS
    clearString( args.mainOrientationOutputFilePath );
    clearString( args.trackedOrientationOutputFilePath );
    clearString( args.combinedOrientationOutputFilePath );
#endif

    args.orientation_tracking = IVAS_HEAD_ORIENT_TRK_NONE;
    args.nonDiegeticPan = 0;
    args.nonDiegeticPanGain = 0.f;
@@ -2944,7 +2952,8 @@ static void parseOption(
            strncmp( args->combinedOrientationOutputFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 );
            break;
#endif
                case CmdLnOptionId_customHrtfFile : assert( numOptionValues == 1 );
        case CmdLnOptionId_customHrtfFile:
            assert( numOptionValues == 1 );
            strncpy( args->customHrtfFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 );
            break;
        case CmdLnOptionId_renderConfigFile: