ESP32 Webradio

jimbob
Posts: 29
Joined: Fri Aug 05, 2016 10:47 pm

Re: ESP32 Webradio

Postby jimbob » Fri May 19, 2017 10:38 am

Hi,

Great work on this. When I try and stream music from my Galaxy S4 phone after a while the sound slows down slightly then gets slightly choppy -- almost seems like a buffer is getting filled somewhere?

Does anyone else have this problem, is it related to the new audio_renderer refactoring?

BuddyCasino
Posts: 230
Joined: Sun Jun 19, 2016 12:00 am

Re: ESP32 Webradio

Postby BuddyCasino » Fri May 19, 2017 10:47 am

There is a 32k buffer, when that runs empty it might get choppy. You can see it on the serial console as "buffer fill". If it gets choppy and the buffer is full, I'd like to know - that shouldn't happen.

jimbob
Posts: 29
Joined: Fri Aug 05, 2016 10:47 pm

Re: ESP32 Webradio

Postby jimbob » Fri May 19, 2017 11:11 am

Hi,

No mention of that

On my S4 I get

Code: Select all

I (39515) BT_APP_CORE: bt_app_task_handler, sig 0x1, 0x1
I (39515) BT_AV: a2dp audio_state_cb state 2
E (42475) BT_AV: audio data pkt cnt 100
E (45425) BT_AV: audio data pkt cnt 200
E (48325) BT_AV: audio data pkt cnt 300
E (51285) BT_AV: audio data pkt cnt 400
E (54255) BT_AV: audio data pkt cnt 500
E (57315) BT_AV: audio data pkt cnt 600
E (60835) BT_AV: audio data pkt cnt 700


I decided to test on my old galaxy s2 and it sounds perfectly good.

On both devices I get a selection of

Code: Select all

E (92955) BT: xBtuQueue failed

E (92975) BT: xBtuQueue failed

E (92995) BT: xBtuQueue failed

E (93025) BT: xBtuQueue failed

E (93045) BT: xBtuQueue failed

E (93065) BT: xBtuQueue failed

E (93095) BT: xBtuQueue failed

E (93105) BT: xHciH4Queue failed

E (93115) BT: xBtuQueue failed

E (93125) BT: xHciH4Queue failed



but that doesn't always correspond with drop in audio quality.

Puzzling!

BuddyCasino
Posts: 230
Joined: Sun Jun 19, 2016 12:00 am

Re: ESP32 Webradio

Postby BuddyCasino » Fri May 19, 2017 11:36 am

Ah, you mean bluetooth. Didn't test that a lot, ESP-IDF does most of the work anyway so I'm not sure I can fix that. The "xBtuQueue Failed" is triggered in btu_task.c, which is Broadcom code. Its possible that we don't consume the PCM buffer fast enough, but I have no idea really.

ethanc
Posts: 1
Joined: Tue May 23, 2017 4:23 am

Re: ESP32 Webradio

Postby ethanc » Tue May 23, 2017 4:42 am

Hi,
I'm trying to connect the web radio player to an mpd server to play locally streamed music. Are mpd http streams supported by the player? If not what are the options of streaming locally stored music to the ESP32.
Thanks,
Ethan

I'm getting this error

Host: 192.168.1.200

I (4826) http_client: ... socket send success
I (5656) audio_player: Buffer fill 49%, 15985 bytes
I (6716) audio_player: RAM left 177896
E (6716) audio_player: unknown mime type: 0
E (6716) audio_player: failed to start decoder task
I (13506) wifi: pm start, type:0

BuddyCasino
Posts: 230
Joined: Sun Jun 19, 2016 12:00 am

Re: ESP32 Webradio

Postby BuddyCasino » Tue May 23, 2017 9:25 am

Looks like no proper mime type header is returned by your server. For MP3, you should return audio/mpeg. Which software are you using?

User avatar
rudi ;-)
Posts: 1094
Joined: Fri Nov 13, 2015 3:25 pm

Re: ESP32 Webradio

Postby rudi ;-) » Sun Jun 11, 2017 4:17 pm

WiFive wrote:
rudi ;-) wrote:you do not need this do - you can play your music and A2DP talking do at same time ;-)


Oh no esp32 karaoke machine is born


step 1 done :) WiFive :)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

BuddyCasino
Posts: 230
Joined: Sun Jun 19, 2016 12:00 am

Re: ESP32 Webradio

Postby BuddyCasino » Tue Jun 13, 2017 9:40 pm

Just a quick update: I just added .pls playlist support. You can now switch between different stations.

@rudi: I'm curious how the end result looks like...

roger_he
Posts: 3
Joined: Fri Mar 03, 2017 2:39 am

Re: ESP32 Webradio

Postby roger_he » Wed Jun 21, 2017 1:35 pm

Hi,

I download the newest solution and want to taste it. I build it with one error:

ESP32_MP3_Decoder/components/playlist/./playlist.c:19:17: fatal error: ini.h: No such file or directory

I checked all the folders, there is no ini.h file. Did one contributor forget to check in for one file? Please have a look and thanks for help.

regards,

Roger

BuddyCasino
Posts: 230
Joined: Sun Jun 19, 2016 12:00 am

Re: ESP32 Webradio

Postby BuddyCasino » Thu Jun 22, 2017 6:44 am

First you've got to run

Code: Select all

git submodule init && git submodule update
. I have updated the docs.

Who is online

Users browsing this forum: BlackEdder and 1 guest