Commit 635182b0 authored by Dominik Weckbecker's avatar Dominik Weckbecker 💬
Browse files

re-order conversion options in convert_ambi_format

parent 3447d9da
Loading
Loading
Loading
Loading
+23 −2
Original line number Diff line number Diff line
@@ -43,7 +43,6 @@ int16_t convert_ambi_format( float in[][L_FRAME48k], float out[][L_FRAME48k], in
        if ( out_format == AMBI_FMT_ACN_N3D )
        {
            renormalize_channels( in, out, order, AMBI_NORM_SN3D, AMBI_NORM_N3D );
            reorder_channels( in, out, order, AMBI_CHANNEL_ORDER_ACN, AMBI_CHANNEL_ORDER_FM );
        }
        else if ( out_format == AMBI_FMT_FM_MAXN )
        {
@@ -64,8 +63,30 @@ int16_t convert_ambi_format( float in[][L_FRAME48k], float out[][L_FRAME48k], in
            assert( 0 && "Unsupported conversion" );
		}
	}
    else if ( in_format == AMBI_FMT_ACN_N3D )
    else if ( out_format == AMBI_FMT_ACN_SN3D )
    {
        if ( in_format == AMBI_FMT_ACN_N3D )
        {
            renormalize_channels( in, out, order, AMBI_NORM_N3D, AMBI_NORM_SN3D );
        }
        else if ( in_format == AMBI_FMT_FM_MAXN )
        {
            reorder_channels( in, out, order, AMBI_CHANNEL_ORDER_FM, AMBI_CHANNEL_ORDER_ACN );
            renormalize_channels( in, out, order, AMBI_NORM_MAXN, AMBI_NORM_SN3D );
        }
        else if ( in_format == AMBI_FMT_SID_SN3D )
        {
            reorder_channels( in, out, order, AMBI_CHANNEL_ORDER_SID, AMBI_CHANNEL_ORDER_ACN );
        }
        else if ( in_format == AMBI_FMT_SID_N3D )
        {
            reorder_channels( in, out, order, AMBI_CHANNEL_ORDER_SID, AMBI_CHANNEL_ORDER_ACN );
            renormalize_channels( in, out, order, AMBI_NORM_N3D, AMBI_NORM_SN3D );
        }
        else
        {
            assert( 0 && "Unsupported conversion" );
        }
    }
    else
    {