Page 1 of 1

32 bit mp3 i2s 上的設定

Posted: Wed Feb 22, 2023 11:40 am
by XiotSamuel
如果我想播放32 bit depth mp3.

是否只是使用以下設定便可?

Code: Select all

    ESP_LOGI(TAG, "[2.2] Create i2s stream to write data to codec chip");
    i2s_stream_cfg_t i2s_cfg = I2S_STREAM_CFG_DEFAULT();
    i2s_cfg.i2s_config.bits_per_sample = I2S_BITS_PER_SAMPLE_32BIT;    
    //i2s_cfg.i2s_config.communication_format = I2S_COMM_FORMAT_STAND_MAX;
    //i2s_cfg.type = AUDIO_STREAM_WRITER;
    ESP_LOGI(TAG, "the sample rate set %d", i2s_cfg.i2s_config.sample_rate);
    i2s_stream_writer = i2s_stream_init(&i2s_cfg);

Re: 32 bit mp3 i2s 上的設定

Posted: Wed Mar 15, 2023 7:23 am
by tempo.tian
I2S 是支持32bits的,直接配置下bits_per_sample就可以了
目前MP3解码库只支持16bits,所以从decode出来的没有32bits