Resample only works on PCM format.
To covert 16bits to 32bits PCM, if all use little endian, you need only left shift 16 bits, no need resample.
If you want to change 16bits mp3 to 32bits mp3, you need firstly decode mp3 into pcm, convert to 32 bits then re-encode to mp3.
Search found 39 matches
- Wed Mar 15, 2023 7:13 am
- Forum: ESP-ADF
- Topic: 16 bits mp3 resample to 32 bits
- Replies: 3
- Views: 2507
- Wed Mar 15, 2023 7:02 am
- Forum: ESP-ADF
- Topic: Basic question about HTTP audio element
- Replies: 1
- Views: 1718
Re: Basic question about HTTP audio element
The mentioned issue is a network issue. You can replace https://dl.espressif.com/dl/audio/ff-16b-2c-44100hz.mp3 to a valid address that you can access. Also you can try to ping espressif.com to check whether success or not g_stream$ ping espressif.com PING espressif.com (143.204.215.83) 56(84) bytes...
- Thu Dec 22, 2022 2:50 am
- Forum: ESP-ADF 中文讨论版
- Topic: ES8388 音量小,求助音量优化经验
- Replies: 3
- Views: 3657
Re: ES8388 音量小,求助音量优化经验
播放音量主要是 es8388_set_voice_volume(int volume)这个API控制的你可以把音量设置为90看声音大不大
- Fri Dec 09, 2022 2:33 am
- Forum: ESP-ADF
- Topic: Looking for the InputKeyService code that compares button voltages.
- Replies: 1
- Views: 2667
Re: Looking for the InputKeyService code that compares button voltages.
You can see the define on: https://github.com/espressif/esp-adf/blob/master/components/audio_board/lyrat_mini_v1_1/board.c#L116 If you use customized board, you can create a folder like following and put your board defines into it https://github.com/espressif/esp-adf/tree/master/examples/get-started...
- Tue Dec 06, 2022 5:06 am
- Forum: ESP-ADF
- Topic: ESP32-S3 ADF Voip Example Port I2S1 Not Working for Microphone
- Replies: 2
- Views: 3193
Re: ESP32-S3 ADF Voip Example Port I2S1 Not Working for Microphone
Have you change the code below:
int ret = i2s_read(CODEC_ADC_I2S_PORT, buf, len, &bytes_read, wait_time);
changed to
int ret = i2s_read(1, buf, len, &bytes_read, wait_time);
For that record and playback use same I2S.
int ret = i2s_read(CODEC_ADC_I2S_PORT, buf, len, &bytes_read, wait_time);
changed to
int ret = i2s_read(1, buf, len, &bytes_read, wait_time);
For that record and playback use same I2S.
- Tue Oct 11, 2022 8:37 am
- Forum: ESP-ADF
- Topic: Resample examples not working
- Replies: 2
- Views: 3214
Re: Resample examples not working
Seems there is not enough memory.
E (15715) FIR_RESAMPLE: failed to allocate p_out buffer.size 196608 line 2010
Please try to enable PSRAM, after enabled adf module will try to use PSRAM firstly.
Menuconfig -> Component Config -> esp32 specific --> support for external, SPI-connected RAM
E (15715) FIR_RESAMPLE: failed to allocate p_out buffer.size 196608 line 2010
Please try to enable PSRAM, after enabled adf module will try to use PSRAM firstly.
Menuconfig -> Component Config -> esp32 specific --> support for external, SPI-connected RAM
- Wed Sep 21, 2022 11:51 am
- Forum: ESP-ADF
- Topic: audio_pipeline_unlink versus audio_pipeline_breakup_elements
- Replies: 1
- Views: 2676
Re: audio_pipeline_unlink versus audio_pipeline_breakup_elements
audio_pipeline_link is used to connect elements from first one to last one It allocates ring buffer for data exchange between audio element. audio_pipeline_unlink do the reverse work, it disconnects elements from each other, and free ringbuffer. audio_pipeline_breakup_elements just disconnect elemen...
- Wed Sep 14, 2022 3:18 am
- Forum: ESP-ADF 中文讨论版
- Topic: Opus decoder volume
- Replies: 1
- Views: 2254
Re: Opus decoder volume
opus目前和其他decoder往上提供相同的接口,因为不是每个decoder都支持设置volume,所以不会单独开出来特殊的API来设置音量 从代码上看opus设置gain也只是做了一次乘法 if(st->decode_gain) { opus_val32 gain; gain = celt_exp2(MULT16_16_P15(QCONST16(6.48814081e-4f, 25), st->decode_gain)); for (i=0;i<frame_size*st->channels;i++) { opus_val32 x; x = MULT16_32_P16(pcm ,gain)...
- Wed Sep 14, 2022 3:07 am
- Forum: ESP-ADF 中文讨论版
- Topic: ESP-ADF MP3 播放如何实现播放进度
- Replies: 1
- Views: 2299
Re: ESP-ADF MP3 播放如何实现播放进度
使用esp_audio相对来说比较简单
1: esp_audio_duration_get 可以用来获取duration
2: esp_audio_time_get可以用来获取当前播放时间
3: esp_audio_seek 可以用来seek到特定的位置
1: esp_audio_duration_get 可以用来获取duration
2: esp_audio_time_get可以用来获取当前播放时间
3: esp_audio_seek 可以用来seek到特定的位置
- Fri Aug 12, 2022 9:15 am
- Forum: ESP-ADF
- Topic: Downmix BT stream from stereo to mono
- Replies: 5
- Views: 5893
Re: Downmix BT stream from stereo to mono
To make all code runs ok you need change following code also: change code in audio_element.c esp_err_t audio_element_set_ringbuf_done(audio_element_handle_t el) { int ret = ESP_OK; if (NULL == el) { return ESP_FAIL; } if (el->out.output_rb) { ret |= rb_done_write(el->out.output_rb); for (int i = 0; ...