[已解决] ESP32-Lyrat V4.3开发板,pipeline_a2dp_source_stream示例项目,蓝牙播放mp3时,声音速度过快

lsh3d2021
Posts: 2
Joined: Sat Nov 20, 2021 4:00 pm

[已解决] ESP32-Lyrat V4.3开发板,pipeline_a2dp_source_stream示例项目,蓝牙播放mp3时,声音速度过快

Postby lsh3d2021 » Sat Nov 20, 2021 4:28 pm

硬件环境:ESP32-Lyrat V4.3开发板
开发环境:
ESP-IDF:v4.4-dev-1447-g9d77aedcf
ESP-ADF:v2.2
1.直接使用pipeline_a2dp_source_stream示例项目来播放boot.mp3音频。在蓝牙耳机连接上后,音频可以播放,但是音频播放的速度比正常快很多;
2.测试了不同的mp3文件和不同的蓝牙耳机,发现还是快进播放;
3.同样的mp3文件,在play_mp3示例项目中,用耳麦或者喇叭方式,可以正常播放;
4.pipeline_bt_source示例项目,也是出现音频播放速度过快,感觉只要通过蓝牙耳机播放,都会如此;

在pipeline_a2dp_source_stream播放时,出现如下错误信息和告警信息
E (9558) BT_L2CAP: l2cab is_cong_cback_context
E (9588) BT_L2CAP: l2cab is_cong_cback_context
E (9608) BT_L2CAP: l2cab is_cong_cback_context
W (10918) FATFS_STREAM: No more data, ret:0
W (11938) BT_APPL: ### UNDERFLOW :: ONLY READ -2 BYTES OUT OF 512 ###
W (11938) BT_APPL: btc_media_aa_prep_sbc_2_send underflow 2, -2
W (11938) BLUETOOTH_SOURCE_EXAMPLE: [ * ] Bluetooth disconnected or suspended
E (11938) BT_APPL: bta_av_str_stopped:audio_open_cnt=1, p_data 0x3f807950
I (11948) BLUETOOTH_SOURCE_EXAMPLE: [ 7 ] Stop audio_pipeline
W (11958) BT_APPL: un-acked a2dp cmd: 3
E (11958) AUDIO_ELEMENT: [file] Element already stopped
W (11968) BT_APPL: ### UNDERFLOW :: ONLY READ -2 BYTES OUT OF 514 ###
E (11968) AUDIO_ELEMENT: [mp3] Element already stopped
W (11978) BT_APPL: btc_media_aa_prep_sbc_2_send underflow 14, -4
W (11988) AUDIO_PIPELINE: There are no listener registered
W (11988) BT_APPL: un-acked a2dp cmd: 3
W (11998) AUDIO_ELEMENT: [bt] Element has not create when AUDIO_ELEMENT_TERMINATE
W (11998) BT_APPL: Media task Scheduled after Suspend
W (12008) AUDIO_ELEMENT: [file] Element has not create when AUDIO_ELEMENT_TERMINATE
W (12018) AUDIO_ELEMENT: [mp3] Element has not create when AUDIO_ELEMENT_TERMINATE
W (12038) BT_AVCT: avct_lcb_last_ccb
W (12038) BT_AVCT: 0: aloc:1, lcb:0x3f80a494/0x3f80a494, ccb:0x3f80a4fc/0x3f80a4fc
W (12048) BT_AVCT: 1: aloc:0, lcb:0x0/0x3f80a494, ccb:0x3f80a514/0x3f80a4fc
W (12048) BT_AVCT: 2: aloc:0, lcb:0x0/0x3f80a494, ccb:0x3f80a52c/0x3f80a4fc
I (12068) BLUETOOTH_SOURCE_EXAMPLE: Device discovery failed, continue to discover...
I (12068) BLUETOOTH_SOURCE_EXAMPLE: Device discovery failed, continue to discover...
W (12078) BT_APPL: [0]: state:1, info:x0, avoid_rs 0
I (12088) BLUETOOTH_SOURCE_EXAMPLE: Discovery started.
W (13218) BT_L2CAP: L2CAP - PSM: 0x0019 not found for deregistration
W (13218) BT_L2CAP: L2CAP - PSM: 0x0017 not found for deregistration
W (13228) BT_L2CAP: L2CAP - PSM: 0x0019 not found for deregistration
W (13228) BT_L2CAP: L2CAP - PSM: 0x0017 not found for deregistration
W (13238) BT_L2CAP: L2CAP - PSM: 0x0019 not found for deregistration
W (13248) BT_L2CAP: L2CAP - PSM: 0x0017 not found for deregistration

请问如何解决?

lsh3d2021
Posts: 2
Joined: Sat Nov 20, 2021 4:00 pm

Re: ESP32-Lyrat V4.3开发板,pipeline_a2dp_source_stream示例项目,蓝牙播放mp3时,声音速度过快

Postby lsh3d2021 » Tue Nov 23, 2021 8:36 am

自己解决了,要在推送到蓝牙耳机前先用 resample-filter 重新转成16000Hz

feng_esp32_2021
Posts: 26
Joined: Thu Nov 18, 2021 12:22 am

Re: ESP32-Lyrat V4.3开发板,pipeline_a2dp_source_stream示例项目,蓝牙播放mp3时,声音速度过快

Postby feng_esp32_2021 » Wed Nov 24, 2021 1:12 am

你是 怎么把普通的mp3 弄到里面去的?

ESP_HengYC
Posts: 184
Joined: Fri Dec 15, 2017 2:45 am

Re: ESP32-Lyrat V4.3开发板,pipeline_a2dp_source_stream示例项目,蓝牙播放mp3时,声音速度过快

Postby ESP_HengYC » Wed Dec 01, 2021 7:46 am

feng_esp32_2021 wrote:
Wed Nov 24, 2021 1:12 am
你是 怎么把普通的mp3 弄到里面去的?


你好, source 例程的文档有说明 它是把 sdcard 卡中的 MP3 文件 解码后 发送 给 sink 端的,请阅读 README 文档

Who is online

Users browsing this forum: No registered users and 11 guests