ESP32 MP3解码器支持24b的mp3文件吗?

chencang
Posts: 4
Joined: Fri Feb 22, 2019 2:54 pm

ESP32 MP3解码器支持24b的mp3文件吗?

Postby chencang » Sun Mar 03, 2019 8:38 am

大家好,我想要播放24b的mp3文件,在例子pipeline_sdcard_mp3_control的ES8388和I2S结构体设置为24b后,实测播放MP3文件时I2S出来的还是16b。难道ESP32的MP3解码器不支持24b的吗?

#define AUDIO_HAL_ES8388_DEFAULT(){ \
.adc_input = AUDIO_HAL_ADC_INPUT_LINE1, \
.dac_output = AUDIO_HAL_DAC_OUTPUT_ALL, \
.codec_mode = AUDIO_HAL_CODEC_MODE_BOTH, \
.i2s_iface = { \
.mode = AUDIO_HAL_MODE_SLAVE, \
.fmt = AUDIO_HAL_I2S_NORMAL, \
.samples = AUDIO_HAL_48K_SAMPLES, \
.bits = AUDIO_HAL_BIT_LENGTH_24BITS, \
}, \
};


#define I2S_STREAM_CFG_DEFAULT() { \
.type = AUDIO_STREAM_WRITER, \
.task_prio = I2S_STREAM_TASK_PRIO, \
.task_core = I2S_STREAM_TASK_CORE, \
.task_stack = I2S_STREAM_TASK_STACK, \
.out_rb_size = I2S_STREAM_RINGBUFFER_SIZE, \
.i2s_config = { \
.mode = I2S_MODE_MASTER | I2S_MODE_TX | I2S_MODE_RX, \
.sample_rate = 44100, \
.bits_per_sample = I2S_BITS_PER_SAMPLE_24BIT, \
.channel_format = I2S_CHANNEL_FMT_RIGHT_LEFT, \
.communication_format = I2S_COMM_FORMAT_I2S, \
.dma_buf_count = 3, \
.dma_buf_len = 300, \
.use_apll = 1, \
.intr_alloc_flags = ESP_INTR_FLAG_LEVEL2, \
}, \
.i2s_pin_config = { \
.bck_io_num = IIS_SCLK, \
.ws_io_num = IIS_LCLK, \
.data_out_num = IIS_DSIN, \
.data_in_num = IIS_DOUT, \
}, \
.i2s_port = 0, \
}

Who is online

Users browsing this forum: No registered users and 34 guests