This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

关于aic3106采入数据的问题

Other Parts Discussed in Thread: OMAP-L137

我用的板子是OMAP-L137,音频模块是aic3106。在此有问题想问。

在aic3106的例程介绍里,在进行了相关的设置后,采样频率定为了48KHz,通过mic口采集数据。关键代码如下:

for ( sec = 0 ; sec < 5 ; sec++ )
    {
        for ( msec = 0 ; msec < 1000 ; msec++ )
        {
            for ( sample = 0 ; sample < 48 ; sample++ )
            {
                /* Read then write the left sample */
                while ( ! ( MCASP1_SRCTL0 & 0x20 ) );
                    sample_data = MCASP1_RBUF0_32BIT;
                while ( ! ( MCASP1_SRCTL5 & 0x10 ) );
                    MCASP1_XBUF5_32BIT =  sample_data;

                /* Read then write the right sample */
                while ( ! ( MCASP1_SRCTL0 & 0x20 ) );
                    sample_data = MCASP1_RBUF0_32BIT;
                while ( ! ( MCASP1_SRCTL5 & 0x10 ) );
                    MCASP1_XBUF5_32BIT = sample_data;
            }
        }
    }

看了这段代码,我的理解是,采入的数据是32位的“0、1”数据流,如果接下来,我想进行加窗、滤波等处理,是否应把sample_data中存放的数转化为浮点数。另外,如果以往,用matlab进行处理,我读入一个音频文件,matlab会提取出反映音频文件幅度特性的数组,那aic3106采入的数据在经过一定转化后,会和matlab中提取的数组一致吗?跪求回复了~