Commit 782439be authored by thomas dettbarn's avatar thomas dettbarn
Browse files

changed the output of the ambi_converter application

parent 30f3b2de
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -61,6 +61,7 @@ int main( int argc, char *argv[] )
    int16_t samples[L_FRAME48k * AMBI_MAX_CHANNELS];
    int16_t order = 0;
    int16_t numChannels;
    const char *name_conventions[6]= { "ACN-SN3D", "ACN-N3D", "FuMa-MaxN", "FuMa-FuMa", "SID-SN3D", "SID-N3D" };

    AMBI_FMT in_format, out_format;

@@ -74,9 +75,9 @@ int main( int argc, char *argv[] )
        out[j] = &samples_f_out[j * L_FRAME48k];
    }

    printf( "Ambisonics converter program\n" );
    if ( argc != 5 )
    {
        printf( "Ambisonics converter program\n" );
        printf( "----------------------------------------------------------------------------------\n" );
        printf( "Usage:\n" );
        printf( "./ambi_converter input_file output_file input_convention output_convention\n" );
@@ -98,8 +99,12 @@ int main( int argc, char *argv[] )
    fileName_out = argv[2];
    in_format = atoi( argv[3] );
    out_format = atoi( argv[4] );

    printf( "In %d, Out: %d\n", in_format, out_format );
    if ( in_format < 0 || out_format < 0 || in_format > 5 || out_format > 5 )
    {
        printf( "input_convention and output convention must be an integer number in [0,5]\n" );
        return -1;
    }
    printf( "In: [%s], Out: [%s]\n",name_conventions[in_format], name_conventions[out_format] );

    wavFile_in = OpenWav( fileName_in, &samplingRate, &numChannels, &samplesInFile, &bps );
    if ( !wavFile_in )