Commit c1f43daa authored by vaclav's avatar vaclav
Browse files

fix crash in smoke test + correct printing of "Output synthesis file"

parent f0ba1892
Loading
Loading
Loading
Loading
Loading
+29 −4
Original line number Diff line number Diff line
@@ -267,7 +267,21 @@ int main(
        }
    }

#ifdef SPLIT_REND_WITH_HEAD_ROT
    if ( arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_CODED )
    {
        fprintf( stdout, "Output metadata file:   %s\n", arg.outputWavFilename );
    }
    else if ( arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_PCM )
    {
        fprintf( stdout, "Output synthesis file:  %s\n", arg.outputWavFilename );
        fprintf( stdout, "Output metadata file:   %s\n", arg.outputMdFilename );
    }
    else
#endif
    {
        fprintf( stdout, "Output synthesis file:  %s\n", arg.outputWavFilename );
    }

    /*------------------------------------------------------------------------------------------*
     * Open HRTF file
@@ -1620,12 +1634,23 @@ static ivas_error initOnFirstGoodFrame(
            return error;
        }

        if ( arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_CODED )
        {
            if ( ( error = split_rend_writer_open( hSplitRendFileReadWrite, arg.outputWavFilename, delayNumSamples_temp[0], delayTimeScale_temp ) ) != IVAS_ERR_OK )
            {
                fprintf( stderr, "\nUnable to open output split rendering metadata file %s\n", arg.outputWavFilename );
                return error;
            }
        }
        else
        {
            if ( ( error = split_rend_writer_open( hSplitRendFileReadWrite, arg.outputMdFilename, delayNumSamples_temp[0], delayTimeScale_temp ) ) != IVAS_ERR_OK )
            {
            fprintf( stderr, "\nUnable to open split rend metadata file %s\n", arg.outputWavFilename );
                fprintf( stderr, "\nUnable to open output split rendering metadata file %s\n", arg.outputWavFilename );
                return error;
            }
        }
    }

    if ( arg.outputFormat != IVAS_DEC_OUTPUT_SPLIT_BINAURAL_CODED )
    {