32 bit mp3 i2s 上的設定

XiotSamuel
Posts: 53
Joined: Sun Aug 29, 2021 1:50 pm

32 bit mp3 i2s 上的設定

Postby XiotSamuel » Wed Feb 22, 2023 11:40 am

如果我想播放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);

tempo.tian
Posts: 40
Joined: Wed Jun 22, 2022 12:10 pm

Re: 32 bit mp3 i2s 上的設定

Postby tempo.tian » Wed Mar 15, 2023 7:23 am

I2S 是支持32bits的,直接配置下bits_per_sample就可以了
目前MP3解码库只支持16bits,所以从decode出来的没有32bits

Who is online

Users browsing this forum: No registered users and 10 guests