Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do i control playback on pipeline_a2dp_source_stream example? (AUD-5951) #1336

Open
hqMicro opened this issue Dec 26, 2024 · 0 comments
Open

Comments

@hqMicro
Copy link

hqMicro commented Dec 26, 2024

Hi everyone!

In my application i have two ESP32 WROVER. One in Sink mode and the other is the Source. The Source is able to startup, connect and stream the music. It's OK. But at the end of the current file i need to go to the next track. I looked for examples and tryed them out but can't get this to work. And further i need to do STOP / PLAY / PAUSE / NEXT / PREV.

My attemt is as below:

        // Advance to the next song when previous finishes
        if (msg.source == (void *) fatfs_stream_reader
            && msg.cmd == AEL_MSG_CMD_REPORT_STATUS) {
            audio_element_state_t el_state = audio_element_get_state(fatfs_stream_reader);
            if (el_state == AEL_STATE_FINISHED) {
                ESP_LOGI(TAG, "[ * ] Finished, advancing to the next song");
                periph_bt_stop(bt_periph);
                
                // audio_pipeline_pause(pipeline);
                // audio_pipeline_stop(pipeline);
                // audio_pipeline_wait_for_stop(pipeline);
                
                // audio_element_set_ringbuf_done(bt_stream_writer);
                // audio_element_finish_state(bt_stream_writer);
                // audio_element_stop(bt_stream_writer);
                // periph_bt_pause(bt_periph);

                // audio_element_reset_state(mp3_decoder);

                audio_pipeline_reset_ringbuffer(pipeline);
                audio_pipeline_reset_elements(pipeline);
                audio_pipeline_change_state(pipeline, AEL_STATE_INIT);
                
                if (sys_state.sd.music.track_current < sys_state.sd.music.track_count) {
                    sys_state.sd.music.track_current++;
                    audio_element_set_uri(fatfs_stream_reader, tracks_list[sys_state.sd.music.track_current]);
                    audio_pipeline_run(pipeline);
                    periph_bt_play(bt_periph);
                }
                else {
                    sys_state.sd.music.track_current = 0;
                    audio_element_set_uri(fatfs_stream_reader, tracks_list[sys_state.sd.music.track_current]);
                    if (sys_state.sd.music.loop == true) {
                        audio_pipeline_run(pipeline);
                        periph_bt_play(bt_periph);
                    }
                }
                ESP_LOGI(TAG, "TRACK CRR: %d/%d %s", sys_state.sd.music.track_current, sys_state.sd.music.track_count, 
                                // tracks_list[sys_state.sd.music.track_current]);
                                audio_element_get_uri(fatfs_stream_reader));
            }
            continue;
        }

The ADF version is at: v2.7-4-g1bc914b7

I (28) boot: ESP-IDF v5.3.1-dirty 2nd stage bootloader
I (28) boot: compile time Dec 26 2024 15:20:58
I (28) boot: Multicore bootloader
I (29) boot: chip revision: v1.1
I (29) qio_mode: Enabling default flash chip QIO
I (30) boot.esp32: SPI Speed      : 80MHz
I (31) boot.esp32: SPI Mode       : QIO
I (31) boot.esp32: SPI Flash Size : 16MB
I (32) boot: Enabling RNG early entropy source...
I (32) boot: Partition Table:
I (33) boot: ## Label            Usage          Type ST Offset   Length
I (34) boot:  0 nvs              WiFi data        01 02 00009000 00004000
I (35) boot:  1 otadata          OTA data         01 00 0000d000 00002000
I (36) boot:  2 phy_init         RF data          01 01 0000f000 00001000
I (36) boot:  3 factory          factory app      00 00 00010000 00753000
I (37) boot: End of partition table
I (38) boot: Defaulting to factory image
I (39) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=324e0h (206048) map
I (93) esp_image: segment 1: paddr=00042508 vaddr=3ffbdb60 size=04728h ( 18216) load
I (98) esp_image: segment 2: paddr=00046c38 vaddr=40080000 size=093e0h ( 37856) load
I (110) esp_image: segment 3: paddr=00050020 vaddr=400d0020 size=ab8dch (702684) map
I (290) esp_image: segment 4: paddr=000fb904 vaddr=400893e0 size=0efd0h ( 61392) load
I (321) boot: Loaded app from partition at offset 0x10000
I (321) boot: Disabling RNG early entropy source...
I (323) quad_psram: This chip is ESP32-D0WD
I (323) esp_psram: Found 8MB PSRAM device
I (323) esp_psram: Speed: 80MHz
I (323) esp_psram: PSRAM initialized, cache is in low/high (2-core) mode.
W (324) esp_psram: Virtual address not enough for PSRAM, map as much as we can. 4MB is mapped
I (325) cpu_start: Multicore app
I (339) cpu_start: Pro cpu start user code
I (339) cpu_start: cpu freq: 240000000 Hz
I (339) app_init: Application information:
I (339) app_init: Project name:     micromowj-smart-home
I (340) app_init: App version:      1
I (340) app_init: Compile time:     Dec 26 2024 15:20:36
I (341) app_init: ELF file SHA256:  16eee3396...
I (342) app_init: ESP-IDF:          v5.3.1-dirty
I (342) efuse_init: Min chip rev:     v0.0
I (343) efuse_init: Max chip rev:     v3.99 
I (344) efuse_init: Chip rev:         v1.1
I (344) heap_init: Initializing. RAM available for dynamic allocation:
I (345) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM
I (346) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM
I (347) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM
I (347) heap_init: At 3FFC3D10 len 0001C2F0 (112 KiB): DRAM
I (348) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (349) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (350) heap_init: At 400983B0 len 00007C50 (31 KiB): IRAM
I (351) esp_psram: Adding pool of 4020K of PSRAM memory to heap allocator
I (352) spi_flash: detected chip: generic
I (352) spi_flash: flash io: qio
W (353) ADC: legacy driver is deprecated, please migrate to `esp_adc/adc_oneshot.h`
I (354) main_task: Started on CPU0
I (355) esp_psram: Reserving pool of 32K of internal memory for DMA/internal allocations
I (355) main_task: Calling app_main()
I (355) APP->MAIN: [APP] Startup..
I (356) APP->MAIN: [APP] Free memory: 4324304 bytes
I (356) APP->MAIN: [APP] IDF version: v5.3.1-dirty
I (357) gpio: GPIO[2]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
I (358) gpio: GPIO[4]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
I (370) TASK->RTC: Status, wifi_level:0, net_error:1, bt_state:0, mqtt_state:0
I (385) APP->MAIN: Device Name: Monitor-9134
I (386) APP->MAIN: Device ID: MONITOR_00C8DC
I (386) TASK->UART: Started
I (386) main_task: Returned from app_main()
I (386) TASK->UART: Running
I (386) TASK_BT_SRC: [ 1 ] Mount sdcard
I (388) AUDIO_THREAD: The esp_periph task allocate stack on internal memory
I (388) SDCARD: Using SPI mode, base path=/sdcard
I (390) gpio: GPIO[5]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
I (391) sdspi_transaction: cmd=52, R1 response: command not supported
I (433) sdspi_transaction: cmd=5, R1 response: command not supported
I (437) TASK->UART: Read 11 bytes: 
 ESP_CMD: OK
I (460) SDCARD: CID name SD16G!

I (889) TASK_BT_SRC: [ 2 ] Start codec chip
I (889) new_codec: new_codec init
I (889) AUDIO_HAL: Codec mode is 2, Ctrl:1
I (889) TASK_BT_SRC: [3.0] Create audio pipeline for playback
I (890) TASK_BT_SRC: [3.1] Create fatfs stream to read data from sdcard
I (891) TASK_BT_SRC: [3.2] Create mp3 decoder to decode mp3 file
I (892) MP3_DECODER: MP3 init
I (892) TASK_BT_SRC: [3.3] Create Bluetooth stream
I (893) BTDM_INIT: BT controller compile version [b022216]
I (894) BTDM_INIT: Bluetooth MAC: d8:13:2a:00:c8:de
I (895) phy_init: phy_version 4830,54550f7,Jun 20 2024,14:22:08
W (960) phy_init: saving new calibration data because of checksum failure, mode(0)
Coex register Wi-Fi channel change btdm cb faild
I (1379) TASK_BT_SRC: [3.4] Register all elements to audio pipeline
I (1379) TASK_BT_SRC: [3.5] Link it together [sdcard]-->fatfs_stream-->mp3_decoder-->bt_stream-->[bt sink]
I (1381) AUDIO_PIPELINE: link el->rb, el:0x3f81b52c, tag:file, rb:0x3f81ef30
I (1381) AUDIO_PIPELINE: link el->rb, el:0x3f81b6b0, tag:mp3, rb:0x3f820f78
W (1382) AUDIO_PIPELINE: FUNC:audio_pipeline_link, LINE:516
W (1383) AUDIO_PIPELINE: el-list: linked:1, kept:0, el:0x3f81b52c,             file, in_rb:0x0, out_rb:0x3f81ef30
W (1384) AUDIO_PIPELINE: el-list: linked:1, kept:0, el:0x3f81b6b0,              mp3, in_rb:0x3f81ef30, out_rb:0x3f820f78
W (1386) AUDIO_PIPELINE: el-list: linked:1, kept:0, el:0x3f81ea70,               bt, in_rb:0x3f820f78, out_rb:0x0
W (1387) AUDIO_PIPELINE: rb-list: linked:1, kept:0, rb:0x3f81ef30, host_el:0x3f81b52c,             file
W (1388) AUDIO_PIPELINE: rb-list: linked:1, kept:0, rb:0x3f820f78, host_el:0x3f81b6b0,              mp3
I (1389) TASK_BT_SRC: [3.6] Set up  uri (file as fatfs_stream, mp3 as mp3 decoder, and default output is bt)
I (1391) TASK_BT_SRC: [3.7] Create bt peripheral
I (1391) TASK_BT_SRC: [3.8] Start bt peripheral
I (1392) TASK_BT_SRC: [ 4 ] Set up  event listener
I (1393) TASK_BT_SRC: [4.1] Listening event from all elements of pipeline
I (1394) TASK_BT_SRC: [4.2] Listening event from peripherals
I (1395) TASK_BT_SRC: [ 5 ] Start audio_pipeline
I (1395) AUDIO_THREAD: The file task allocate stack on internal memory
I (1396) AUDIO_ELEMENT: [file-0x3f81b52c] Element task created
I (1397) AUDIO_THREAD: The mp3 task allocate stack on external memory
I (1398) AUDIO_ELEMENT: [mp3-0x3f81b6b0] Element task created
I (1399) AUDIO_ELEMENT: [bt-0x3f81ea70] Element task created
I (1399) AUDIO_PIPELINE: Func:audio_pipeline_run, Line:359, MEM Total:4208600 Bytes, Inter:223423 Bytes, Dram:192359 Bytes, Dram largest free:110592Bytes

I (1401) AUDIO_ELEMENT: [file] AEL_MSG_CMD_RESUME,state:1
I (1403) AUDIO_ELEMENT: [mp3] AEL_MSG_CMD_RESUME,state:1
I (1403) MP3_DECODER: MP3 opened
I (1404) AUDIO_PIPELINE: Pipeline started
I (1404) TASK_BT_SRC: [ 6 ] Listen for all pipeline events
W (1406) BT_BTC: A2DP Enable with AVRC
W (1407) BT_AVRC: For AVRCP Target Cateory 1 and 3, SDP record shall contain additional protocol list
I (1415) TASK_BT_SRC: Discovery started.
I (1422) TASK_BT_SRC: Found MP3 file: /sdcard/Music/01 Theme From Antarctica.mp3
I (1423) TASK_BT_SRC: Found MP3 file: /sdcard/Music/02 - White Winter Hymnal.mp3
I (1423) TASK_BT_SRC: Found MP3 file: /sdcard/Music/03 Conquest Of Paradise.mp3
I (1427) TASK_BT_SRC: Found MP3 file: /sdcard/Music/04 Prelude.mp3
I (1427) TASK_BT_SRC: Found MP3 file: /sdcard/Music/4_402440703377932674.mp3
I (1427) TASK_BT_SRC: Found MP3 file: /sdcard/Music/4_5895429697134657954.mp3
I (1428) TASK_BT_SRC: Found MP3 file: /sdcard/Music/07 - Dido - Us 2 Little Gods.mp3
I (1429) TASK_BT_SRC: Found MP3 file: /sdcard/Music/Helios (Keith Kenniff) - Coast Off_140416221733.mp3
I (1433) TASK_BT_SRC: Found MP3 file: /sdcard/Music/Pink Floyd - Another Brick in the Wall_230516180650.mp3
I (1433) TASK_BT_SRC: Found MP3 file: /sdcard/Music/Pink Floyd - High Hopes.mp3
I (1434) TASK_BT_SRC: Found MP3 file: /sdcard/Music/Track 01.mp3
I (1435) TASK_BT_SRC: Found MP3 file: /sdcard/Music/Track 03.mp3
I (1436) TASK_BT_SRC: Found MP3 file: /sdcard/Music/Track 05.mp3
I (1439) TASK_BT_SRC: Found MP3 file: /sdcard/Music/Track 10.mp3
I (1454) FATFS_STREAM: File size: 1764778 byte, file position: 0
I (1467) TASK_BT_SRC: Directory with MP3 files: /sdcard/Music/Schiller
I (1484) TASK_BT_SRC: Directory with MP3 files: /sdcard/Music/Kourosh Yaghmaei
I (1502) TASK_BT_SRC: Directory with MP3 files: /sdcard/Music/Habib
I (1520) TASK_BT_SRC: Directory with MP3 files: /sdcard/Music/Beat
I (1537) TASK_BT_SRC: Directory with MP3 files: /sdcard/Music/Khareji
I (1554) TASK_BT_SRC: Directory with MP3 files: /sdcard/Music/Techno
I (1577) CODEC_ELEMENT_HELPER: The element is 0x3f81b6b0. The reserve data 2 is 0x0.
I (1605) TASK_BT_SRC: [ * ] Receive music info from mp3 decoder, sample_rates=44100, bits=16, ch=2, duration=0
I (1638) TASK->UART: Read 11 bytes: 
 ESP_CMD: OK
I (1720) TASK->UART: Read 11 bytes: 
 ESP_CMD: OK
I (1792) TASK->UART: Read 11 bytes: 
 ESP_CMD: OK
I (1864) TASK->UART: Read 11 bytes: 
 ESP_CMD: OK
I (1946) TASK->UART: Read 11 bytes: 
 ESP_CMD: OK
I (2018) TASK->UART: Read 11 bytes: 
 ESP_CMD: OK
I (2090) TASK->UART: Read 11 bytes: 
 ESP_CMD: OK
I (2442) TASK_BT_SRC: Scanned device: 30:ae:a4:65:18:2e
I (2443) TASK_BT_SRC: --Class of Device: 0x1f00
I (2443) TASK_BT_SRC: --RSSI: -66
I (2443) TASK_BT_SRC: --Name: SPEAKER_65182C
I (2444) TASK_BT_SRC: need device name SPEAKER_65182C
I (2444) TASK_BT_SRC: Found a target device, address 30:ae:a4:65:18:2e, name SPEAKER_65182C
I (2446) TASK_BT_SRC: Cancel device discovery ...
I (2447) TASK_BT_SRC: Device discovery stopped.
I (2447) TASK_BT_SRC: a2dp connecting to peer: SPEAKER_65182C
W (2448) BT_APPL: reset flags
W (23240) BT_SDP: SDP - Rcvd conn cnf with error: 0x8  CID 0x40

W (23241) BT_HCI: hcif conn complete: hdl 0x81, st 0x8
W (23241) BT_BTC: BTA_AV_OPEN_EVT::FAILED status: 2

I (23242) A2DP_STREAM: a2dp source disconnected
W (23242) TASK_BT_SRC: [ * ] Bluetooth disconnected or suspended
W (23243) BT_LOG: ESP_A2D_MEDIA_CTRL_STOP is deprecated, using ESP_A2D_MEDIA_CTRL_SUSPEND instead.

I (23246) TASK_BT_SRC: Discovery started.
I (23742) TASK_BT_SRC: Scanned device: 30:ae:a4:65:18:2e
I (23742) TASK_BT_SRC: --Class of Device: 0x1f00
I (23743) TASK_BT_SRC: --RSSI: -67
I (23743) TASK_BT_SRC: --Name: SPEAKER_65182C
I (23744) TASK_BT_SRC: need device name SPEAKER_65182C
I (23744) TASK_BT_SRC: Found a target device, address 30:ae:a4:65:18:2e, name SPEAKER_65182C
I (23745) TASK_BT_SRC: Cancel device discovery ...
I (23747) TASK_BT_SRC: Device discovery stopped.
I (23747) TASK_BT_SRC: a2dp connecting to peer: SPEAKER_65182C
W (44852) BT_SDP: SDP - Rcvd conn cnf with error: 0x8  CID 0x41

W (44852) BT_HCI: hcif conn complete: hdl 0x81, st 0x8
W (44852) BT_BTC: BTA_AV_OPEN_EVT::FAILED status: 2

I (44853) A2DP_STREAM: a2dp source disconnected
W (44853) TASK_BT_SRC: [ * ] Bluetooth disconnected or suspended
W (44854) BT_LOG: ESP_A2D_MEDIA_CTRL_STOP is deprecated, using ESP_A2D_MEDIA_CTRL_SUSPEND instead.

I (44857) TASK_BT_SRC: Discovery started.
I (46013) TASK_BT_SRC: Scanned device: 30:ae:a4:65:18:2e
I (46013) TASK_BT_SRC: --Class of Device: 0x1f00
I (46013) TASK_BT_SRC: --RSSI: -68
I (46014) TASK_BT_SRC: --Name: �P♫��)�?☺
I (46014) TASK_BT_SRC: need device name SPEAKER_65182C
I (46455) TASK_BT_SRC: Scanned device: 30:ae:a4:65:18:2e
I (46455) TASK_BT_SRC: --Class of Device: 0x1f00
I (46455) TASK_BT_SRC: --RSSI: -67
I (46455) TASK_BT_SRC: --Name: SPEAKER_65182C
I (46456) TASK_BT_SRC: need device name SPEAKER_65182C
I (46457) TASK_BT_SRC: Found a target device, address 30:ae:a4:65:18:2e, name SPEAKER_65182C
I (46458) TASK_BT_SRC: Cancel device discovery ...
I (46459) TASK_BT_SRC: Device discovery stopped.
I (46460) TASK_BT_SRC: a2dp connecting to peer: SPEAKER_65182C
W (67102) BT_SDP: SDP - Rcvd conn cnf with error: 0x8  CID 0x40

W (67102) BT_HCI: hcif conn complete: hdl 0x81, st 0x8
W (67102) BT_BTC: BTA_AV_OPEN_EVT::FAILED status: 2

I (67103) A2DP_STREAM: a2dp source disconnected
W (67103) TASK_BT_SRC: [ * ] Bluetooth disconnected or suspended
W (67104) BT_LOG: ESP_A2D_MEDIA_CTRL_STOP is deprecated, using ESP_A2D_MEDIA_CTRL_SUSPEND instead.

I (67107) TASK_BT_SRC: Discovery started.
I (67424) TASK_BT_SRC: Scanned device: 30:ae:a4:65:18:2e
I (67424) TASK_BT_SRC: --Class of Device: 0x1f00
I (67424) TASK_BT_SRC: --RSSI: -67
I (67425) TASK_BT_SRC: --Name: �P♫��)�?☺
I (67425) TASK_BT_SRC: need device name SPEAKER_65182C
I (67666) TASK_BT_SRC: Scanned device: 30:ae:a4:65:18:2e
I (67666) TASK_BT_SRC: --Class of Device: 0x1f00
I (67666) TASK_BT_SRC: --RSSI: -66
I (67666) TASK_BT_SRC: --Name: SPEAKER_65182C
I (67667) TASK_BT_SRC: need device name SPEAKER_65182C
I (67668) TASK_BT_SRC: Found a target device, address 30:ae:a4:65:18:2e, name SPEAKER_65182C
I (67669) TASK_BT_SRC: Cancel device discovery ...
I (67670) TASK_BT_SRC: Device discovery stopped.
I (67671) TASK_BT_SRC: a2dp connecting to peer: SPEAKER_65182C
W (87903) BT_SDP: SDP - Rcvd conn cnf with error: 0x8  CID 0x41

W (87903) BT_HCI: hcif conn complete: hdl 0x81, st 0x8
W (87904) BT_BTC: BTA_AV_OPEN_EVT::FAILED status: 2

I (87904) A2DP_STREAM: a2dp source disconnected
W (87905) TASK_BT_SRC: [ * ] Bluetooth disconnected or suspended
W (87906) BT_LOG: ESP_A2D_MEDIA_CTRL_STOP is deprecated, using ESP_A2D_MEDIA_CTRL_SUSPEND instead.

I (87908) TASK_BT_SRC: Discovery started.
I (89078) TASK_BT_SRC: Scanned device: 30:ae:a4:65:18:2e
I (89079) TASK_BT_SRC: --Class of Device: 0x1f00
I (89079) TASK_BT_SRC: --RSSI: -66
I (89079) TASK_BT_SRC: --Name: SPEAKER_65182C
I (89080) TASK_BT_SRC: need device name SPEAKER_65182C
I (89081) TASK_BT_SRC: Found a target device, address 30:ae:a4:65:18:2e, name SPEAKER_65182C
I (89082) TASK_BT_SRC: Cancel device discovery ...
I (89083) TASK_BT_SRC: Device discovery stopped.
I (89084) TASK_BT_SRC: a2dp connecting to peer: SPEAKER_65182C
W (89789) BT_HCI: hcif conn complete: hdl 0x81, st 0x0
E (89897) BT_APPL: bta_av_rc_create ACP handle exist for shdl:0
W (89986) BT_APPL: new conn_srvc id:18, app_id:0
I (89987) A2DP_STREAM: a2dp source connected
I (89987) A2DP_STREAM: a2dp media ready checking ...
W (89988) BT_APPL: new conn_srvc id:18, app_id:1
I (90000) BT_LOG: bta_av_link_role_ok hndl:x41 role:0 conn_audio:x1 bits:1 features:x864b

I (90073) A2DP_STREAM: AVRC conn_state evt: state 1, [30:ae:a4:65:18:2e]
W (90115) A2DP_STREAM: AVRC ct remote features 24b
W (90115) A2DP_STREAM: AVRC tg remote features 24b, CT features 1  ///////////////////////// Music streaming start
W (199391) FATFS_STREAM: No more data, ret:0                       ///////////////////////// END
I (199391) AUDIO_ELEMENT: IN-[file] AEL_IO_DONE,0
I (199392) TASK_BT_SRC: [ * ] Finished, advancing to the next song
W (199392) BT_LOG: ESP_A2D_MEDIA_CTRL_STOP is deprecated, using ESP_A2D_MEDIA_CTRL_SUSPEND instead.

I (199394) AUDIO_PIPELINE: Func:audio_pipeline_run, Line:359, MEM Total:4157332 Bytes, Inter:210475 Bytes, Dram:179411 Bytes, Dram largest free:110592Bytes

I (199395) AUDIO_ELEMENT: [file] AEL_MSG_CMD_RESUME,state:1
I (199407) FATFS_STREAM: File size: 5963365 byte, file position: 0
W (201397) AUDIO_ELEMENT: [mp3-0x3f81b6b0] RESUME timeout
E (201397) AUDIO_PIPELINE: audio_pipeline_resume failed
W (202630) BT_HCI: hcif mode change: hdl 0x81, mode 2, intv 54, status 0x0
W (203397) AUDIO_ELEMENT: [file-0x3f81b52c] Element task destroy timeout[2000]
W (205397) AUDIO_ELEMENT: [mp3-0x3f81b6b0] Element task destroy timeout[2000]
I (205397) TASK_BT_SRC: TRACK CRR: 1/14 /sdcard/Music/02 - White Winter Hymnal.mp3
W (205399) BT_HCI: hci cmd send: unsniff: hdl 0x81
W (205428) BT_HCI: hcif mode change: hdl 0x81, mode 0, intv 0, status 0x0
I (205461) BT_LOG: bta_av_link_role_ok hndl:x41 role:0 conn_audio:x1 bits:1 features:x864b

I (205493) AUDIO_ELEMENT: [mp3] AEL_MSG_CMD_RESUME,state:1
I (205493) MP3_DECODER: MP3 opened
I (205494) TASK_BT_SRC: [ * ] Receive music info from mp3 decoder, sample_rates=44100, bits=16, ch=2, duration=0

According to the above log, the music stream starts after 90115 and ends at 199391. In my code, I set the new URI and attempt to play, but nothing happened after the last log line. I am unsure if I am checking the correct FLAG for end of play detection or resetting the pipeline operation correctly.

Thanks in advance!

@github-actions github-actions bot changed the title How do i control playback on pipeline_a2dp_source_stream example? How do i control playback on pipeline_a2dp_source_stream example? (AUD-5951) Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant