Commit 98486f6c authored by Huo, Jiaquan's avatar Huo, Jiaquan
Browse files

bit exact: ext vs hoa3

parent f3e8758a
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -1148,6 +1148,28 @@ ivas_error ivas_init_decoder(
        {
            hDecoderConfig->nchan_out = st_ivas->nchan_transport + st_ivas->nchan_ism;
        }
        else if (st_ivas->ivas_format == SBA_FORMAT)
        {
            printf("%s::%s:%d\n", __FILE__, __func__, __LINE__);
            switch (st_ivas->sba_order)
            {
            case SBA_FOA_ORDER:
                hDecoderConfig->output_config = IVAS_AUDIO_CONFIG_FOA;
                break;
            case SBA_HOA2_ORDER:
                hDecoderConfig->output_config = IVAS_AUDIO_CONFIG_HOA2;
                break;
            case SBA_HOA3_ORDER:
                hDecoderConfig->output_config = IVAS_AUDIO_CONFIG_HOA3;
                break;
            default:
                fprintf(stderr, "Unsupported SBA order %d\n", st_ivas->sba_order);
                return IVAS_ERR_WRONG_PARAMS; // jhuo: correct error code?
                break;
            }
            hDecoderConfig->nchan_out = audioCfg2channels(hDecoderConfig->output_config);
            return ivas_init_decoder(st_ivas);
        }
        else if ( !( st_ivas->ism_mode == ISM_MODE_PARAM ) )
        {
            hDecoderConfig->nchan_out = st_ivas->nchan_transport;