kodera2t / ESP32_OLED_webradio

OLED display support is added to ESP32 MP3 web radio/bluetotooth speaker code by MrBuddyCasino's. Now webradio station switching is supported (implemented by n24bass)
246 stars 68 forks source link

Buffer underflow with Icy-MetaData: 1 with Dac-Audio #10

Closed unkown12345 closed 6 years ago

unkown12345 commented 6 years ago

Hi, Icy-MetaData works: http.c
if(asprintf(&request, "%s%s%s%s%s%s", "GET ", url->path, " HTTP/1.0\r\nHost: ", url->host, "\r\n","Icy-MetaData: 1\r\n\r\n") < 0)

but http://st01.dlf.de/dlf/01/128/mp3/stream.mp3 works only in Audio Output Mode -PDM . Other Audio Output Modes (no PDM ) gets error after 1 Minute "audio_player: Buffer fill " goes down from 98% and after 2 Minutes to 1-5% stable .....mad_decoder: Buffer underflow, need ...

The same with MrBuddyCasino/ESP32_MP3_Decoder. You dont need connect oled or Dac-Device to test it.

I hope other Users can reproduce it and give solutions.

I have tried a lot, example When I stop the decoder-Output for 100millisecondes the audio_player: Buffer fill 98% and goes down after 1 Minutes .....

I have understand Input-Raw-Data-http-frames are visible in parser , frame.c find mp3-Data stream.c sream out Data to i2s

but I dont understand where I have to search.

The Input-Data makes trouble only when Audio Output Modes is no PDM , lookes like i2s problem ? Input-Raw-Data needs more time fill fifo, is this right ? But why Problems after exactly 1 Minute sudently , looks like overrun error ?

I hope some body have time are interestet or have a link how it works the decoding process from Raw-Data-http-frames to i2s and which files in mad serve it .

I have tested with http://st01.dlf.de/dlf/01/128/mp3/stream.mp3 buffer goes down after 1 Minute with http://st01.dlf.de/dlf/01/64/mp3/stream.mp3 buffer goes down after 2 Minute

Thx Reini

My config ESP32D0WDQ6 (revision 0) ES9023 Dac but this not important Oled128x64

unkown12345 commented 6 years ago

Hi again, I solved problems with Icy-MetaData. I write a http-Icy-MetaData-Parser to show StreamTitle in Oled-SSD1306_6432.

I will share it with kodera2t for next update. Please contact me to send files: ritaripp@gmx.de Thx Reini

vibnwis commented 6 years ago

Hi Reini, Great job! Would you mind send the files to me, please? I would like to test it here. Please send it to vibnwis@gmail.com. I look forward to hearing from you soon.

Thanks in advance. Vi

vibnwis commented 6 years ago

Hi Reini, I will update you to your email directly. From the history of this issue, two days after you raised the update, kodera2t closed the issue. Very negative behaviour! How could this issue been resolved when the source has not been updated! IMO, Kodera2t has no interest or intention to patch your resolution. There is always conflicts of interest when open source resource is used for personal gain - commercialization of own products.