Git Product home page Git Product logo

esp32-vs1053_ext's Introduction

ESP32 vs1053_ext

With this library You can easily build a MiniWebRadio in Adruino or Eclipse SDK. I have found the Originalcode by EdZelf ESP32 Webradio. The code is extended with a WiFi-client. This library can play many radiostations up to 320kb/s. Chunked data transfer is supported. Playlists can be m3u, pls or asx, dataformat can be mp3, wma, aac, or ogg, asx playlists must contains only audio but no additional videodata. Also it can play mp3-files from SD Card and from text using Google Translate Service (thanks to horihiro, included esp8266-google-tts library)
The class provides optional events:
vs1053_showstreaminfo     shows th connexted URL
vs1053_showstreamtitle     the played title
vs1053_showstation           the name of the connected station
vs1053_info                         additional information for debugging
vs1053_bitrate                     this is the bitrate of the set station
vs1053_eof_mp3                 mp3 player reaches the end of file
vs1053_eof_stream             end of web file
vs1053_commercial             is there a commercial at the begin, show the duration in seconds
vs1053_icyurl                       if the station have a homepage, show the URL
vs1053_lasthost                   contains the really connected URL (originally may be changed by redirection)

#include "Arduino.h"
#include <SPI.h>
#include <WiFi.h>
#include "vs1053_ext.h"

// Digital I/O used
#define VS1053_CS      2
#define VS1053_DCS     4
#define VS1053_DREQ   36

#define VS1053_MOSI   23
#define VS1053_MISO   19
#define VS1053_SCK    18

String ssid =     "Wolles-POWERLINE";
String password = "xxxx";

int volume=15;

VS1053 mp3(VS1053_CS, VS1053_DCS, VS1053_DREQ, VSPI, VS1053_MOSI, VS1053_MISO, VS1053_SCK);

//The setup function is called once at startup of the sketch
void setup() {

    Serial.begin(115200);
    SPI.begin();
    //SD.begin();
    WiFi.disconnect();
    WiFi.mode(WIFI_STA);
    WiFi.begin(ssid.c_str(), password.c_str());
    while (WiFi.status() != WL_CONNECTED) delay(1500);
    mp3.begin();
    //  mp3.loadUserCode(); // FLAC plugin
    mp3.setVolume(volume);
    mp3.connecttohost("streambbr.ir-media-tec.com/berlin/mp3-128/vtuner_web_mp3/");
    //mp3.connecttohost("stream.landeswelle.de/lwt/mp3-192");                 // mp3 192kb/s
    //mp3.connecttohost("http://radio.hear.fi:8000/hear.ogg");                // ogg
    //mp3.connecttohost("tophits.radiomonster.fm/320.mp3");                   // bitrate 320k
    //mp3.connecttohost("http://star.jointil.net/proxy/jrn_beat?mp=/stream"); // chunked data transfer
    //mp3.connecttohost("http://stream.srg-ssr.ch/rsp/aacp_48.asx");          // asx
    //mp3.connecttohost("www.surfmusic.de/m3u/100-5-das-hitradio,4529.m3u");  // m3u
    //mp3.connecttohost("https://raw.githubusercontent.com/schreibfaul1/ESP32-audioI2S/master/additional_info/Testfiles/Pink-Panther.wav"); // webfile
    //mp3.connecttohost("http://stream.revma.ihrhls.com/zc5060/hls.m3u8");    // HLS
    //mp3.connecttohost("https://live-cdn.sr.se/pool2/p2musik/p2musik.isml/p2musik-audio=192000.m3u8"); // HLS transport stream
    //mp3.connecttoFS(SD, "320k_test.mp3"); // SD card, local file
    //mp3.connecttospeech("Wenn die Hunde schlafen, kann der Wolf gut Schafe stehlen.", "de");
}

// The loop function is called in an endless loop
void loop()
{
    mp3.loop();
}

// next code is optional:
void vs1053_info(const char *info) {                // called from vs1053
    Serial.print("DEBUG:        ");
    Serial.println(info);                           // debug infos
}
void vs1053_showstation(const char *info){          // called from vs1053
    Serial.print("STATION:      ");
    Serial.println(info);                           // Show station name
}
void vs1053_showstreamtitle(const char *info){      // called from vs1053
    Serial.print("STREAMTITLE:  ");
    Serial.println(info);                           // Show title
}
void vs1053_showstreaminfo(const char *info){       // called from vs1053
    Serial.print("STREAMINFO:   ");
    Serial.println(info);                           // Show streaminfo
}
void vs1053_eof_mp3(const char *info){              // called from vs1053
    Serial.print("vs1053_eof:   ");
    Serial.print(info);                             // end of mp3 file (filename)
}
void vs1053_bitrate(const char *br){                // called from vs1053
    Serial.print("BITRATE:      ");
    Serial.println(String(br)+"kBit/s");            // bitrate of current stream
}
void vs1053_commercial(const char *info){           // called from vs1053
    Serial.print("ADVERTISING:  ");
    Serial.println(String(info)+"sec");             // info is the duration of advertising
}
void vs1053_icyurl(const char *info){               // called from vs1053
    Serial.print("Homepage:     ");
    Serial.println(info);                           // info contains the URL
}
void vs1053_eof_speech(const char *info){           // called from vs1053
    Serial.print("end of speech:");
    Serial.println(info);
}
void vs1053_lasthost(const char *info){             // really connected URL
    Serial.print("lastURL:      ");
    Serial.println(info);
}

Breadboard Breadboard

ESP32 developerboard connections Connections

Tested with this mp3 module mp3 module

esp32-vs1053_ext's People

Contributors

per1234 avatar schreibfaul1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esp32-vs1053_ext's Issues

SPIFFS

Hi,
I wanted to move the project from ESP32-audioI2S
on vs1053,
but did not find the function connecttoFS,
(I have files in SPIFFS),
wait for her in future versions?
Thank you.

ch376 support

please support ch376 because usb flash memories are very public

Compatibility with Adafruit's VS1053 module (Music Maker FeatherWing)

I have an ESP32-S3 Feather TFT, and an Adafruit Music Maker FeatherWing (VS1053) module.

I think I've sorted out the pins correctly (I verified with the Music Maker pins documentation):

#define VS1053_CS 6
#define  VS1053_DCS 10
#define  VS1053_DREQ 9
#define  SD_CS 5

VS1053 audio(VS1053_CS, VS1053_DCS, VS1053_DREQ, HSPI, MOSI, MISO, SCK);

I can start a web radio stream successfully. However, I get no audio out of the VS1053.
Moreover, SD.begin() returns false. If I try to print the VS1053's SCI_STATUS, I get 0.

What do you think could be the issue?

Below is my main.cpp:

#include <Arduino.h>
#include <SPI.h>
#include <WiFi.h>
#include <vs1053_ext.h>

#define VS1053_CS 6
#define VS1053_DCS 10
#define VS1053_DREQ 9
#define SD_CS 5

String ssid = "****";
String password = "****";

VS1053 audio(VS1053_CS, VS1053_DCS, VS1053_DREQ, HSPI, MOSI, MISO, SCK);

void setup()
{
  delay(5000);
  pinMode(SD_CS, OUTPUT);
  digitalWrite(SD_CS, HIGH);
  Serial.begin(115200);
  SPI.begin(SCK, MISO, MOSI);
  if (!SD.begin()) {
    Serial.println("SD Card Mount Failed");
  };
  WiFi.disconnect();
  WiFi.mode(WIFI_STA);
  WiFi.begin(ssid.c_str(), password.c_str());
  while (WiFi.status() != WL_CONNECTED) {
    Serial.println("Not connected to AP");
    delay(1500);
  }
  Serial.println("Connected to AP");
  audio.begin();
  audio.setVolume(15);                                                                              
  auto connectedToWebRadio = audio.connecttohost("http://icecast.radiofrance.fr/franceinfo-hifi.aac"); // aac
  if (connectedToWebRadio) {
    Serial.println("Connected to web radio");
  } else {
    Serial.println("Failed to connect to web radio");
  }

  // SD.exists("sample.mp3") ? Serial.println("sample.mp3 exists") : Serial.println("sample.mp3 does not exist");
}

Rotary encoder

Hello, your library is great! But why the rotary encoder "KY 040" doesn't work with your library? (I tried several rotary encoder libraries) If I run mp3.loop (); in about 80ms interval, the sound tears but the rotary encoder starts working. Do you have a solution? Thank you for your time and sorry for my english.

volume

Hi, I set the volume to 10, stop the player (go to another screen), then restart the player, the song starts at maximum volume, if you make a getVolume() request, it shows 10 When you increase or decrease the sound by 1, the sound becomes correct (9 or 11), can this be fixed? Thanks.

VS1053::getVolume() correction

HI dear wolle
thanks for this great lib
i found a little bug in this lib : VS1053::getVolume() returns wrong value ins it needs a little correction in VS1053::setVolume
this is your code:
void VS1053::setVolume(uint8_t vol)
{
uint16_t value; // Value to send to SCI_VOL
if(vol > 21) vol=21;
vol=volumetable[vol];
if(vol != curvol)
{
curvol=vol; // Save for later use
value=map(vol, 0, 100, 0xF8, 0x00); // 0..100% to one channel
value=(value << 8) | value;
write_register(SCI_VOL, value); // Volume left and right
}
}

for correction please edit:
void VS1053::setVolume(uint8_t vol)
{
uint16_t value; // Value to send to SCI_VOL
if(vol > 21) vol=21;

if(vol != curvol)
{
    curvol=vol;                                      // Save for later use
    vol=volumetable[vol];
    value=map(vol, 0, 100, 0xF8, 0x00);              // 0..100% to one channel
    value=(value << 8) | value;
    write_register(SCI_VOL, value);                  // Volume left and right
}

}

Change of pins no audio

Hi,

When I change the Pins used for the VS1053 there is no audio output, eg using the following pins:

// Digital I/O used
#define VS1053_CS     33
#define VS1053_DCS    32
#define VS1053_DREQ   34

If I use the defult pins it work ok.

Interrupted music

I have a very simple implementation, very similar to the tiny example . It runs good but sometimes music is interrupted for very short time . No keys or display . Only the player on one radio station.

Any hints what might be the reason? Is it possible to increase the buffer? How to test for the reason? Is this normal behavior?

Provide License Information

First of all, thank you for providing this library extension.

Background - Use-Case:
I would like to add your library to a (until now private) application that I am building, which basically adds a Web-Application to configure Network-Settings and lets you control (play) Web-Radios from your smartphone. It already works very fine. In using your lib extension it would reach a new degree of awesomeness :).

However, I would also like to make the application publicly available, so I am kindly asking you to provide license information in order to be on the safe side.

Recommendation:
Since the original code uses GNU Public license (https://github.com/Edzelf/ESP32-Radio/blob/master/LICENSE) you can just add a GNU license and state your changes (see conditions of license). That should be enough I guess.

Merry Christmas and Happy Holidays

Please add ogg-vorbis tags

Hello schreibfaul1 ,

thank you very much for the library, it makes my project perfect.
I would like to ask you, if it is possible to implement ogg-vorbis tag reading.
Unfortunately ogg-vorbis has no icy-title tag, but i would like to show the title equivalent to the mp3 icy-title on my radio display.

Regards
Mars

Sorry that doesnt work

Hello, I tried other library and its working, your doesnt even connect to the stream...

here's my config:

// We're using the standard SPI pins, but we will need to define the
// extra pins for CS, DCS, and DREQ.
#define VS1053_CS 32
#define VS1053_DCS 33
#define VS1053_DREQ 35

Thanks.
Marc.

AUDIO_info: Metadata block to long! Skipping all Metadata from now on. Causes a sound problem: BR Radio only!

Hello Wolle,
due to your great prepared project and good documentation now I successfully built my 1st own MiniWebRadio V2 (ESP32-DevKitC & ext. VS1053-Module).
But since a few days I got continuous sound distortions (bad "plopp's" and "quieks" from the speakers), but only when I listen any of the 14 different livestreams of "BR Radio (Bayrischer Rundfunk)". e.g. url's: https://streams.br.de/bayern1obb_2.m3u
I found the reason of the problem via PlatformIO Serial Monitor:

AUDIO_info: Metadata block to long! Skipping all Metadata from now on.

I found, that all the stations of BR Radio send (~since a few days?) a longer Metadata-block, than expected/allowed in your library vs1053_ext.cpp (see line No. 3268):

if(!metalen) {
int b = _client->read(); // First byte of metadata?
metalen = b * 16 ; // New count for metadata including length byte
if(metalen > 512){
AUDIO_INFO("Metadata block to long! Skipping all Metadata from now on.");
m_f_metadata = false; // expect stream without metadata
return 1;
}

To test/try, how much more Metadata Bytes than 512 sends BR Radio from now on, I increased the value 512 + 16, then the sound distortions were finished!!! But I got a txt overflow ...
If you can reproduce / confirm the problem, please help me to fix the problem "professional" by extend the length of Metadata block
(Due to I'm a very bad programmer = beginner).

Many thanks,
da TubaFonse.

loadUserCode halts processing

The call to loadUserCode(); // load in VS1053B if you want to play flac in the VS1053::begin function appears to block. When I remove the call, the begin function return otherwise not.

Connecttohost only https:// works

Hello,
I have enjoyed using your VS1053-ext library for years.
But with minor changes to the application, what the library uses it for, I kept getting ssl problems.
Only when I went back to Espressif version 2.0 in PlatformIO did I not get the error message and everything went well.
But now I thought I should give it some time to upgrade to Espressif 4.0 and now also use the latest version of VS1053-ext (last update now 4 days ago).
Connectto speech is going well.
I have not tested ConnecttoSd.
Connecttohost does NOT work for all the example channels below that are in your example code except those with https:// (mp3.connecttohost("https://icecast.omroepvenray.nl/lov.mp3");).
The last one works, the others give "Request .......... failed!"
I would like to ask you to test this yourself and if you find the same problem, find out and fix the problem?

Note:
This one also works (also a https://).
mp3.connecttohost("https://download-a.akamaihd.net/files/media_publication/30/pksjj_O_133.mp3");

Thank you very much indeed.
Below is the code and the results of my test.

Code:

//The setup function is called once at startup of the sketch
void setup() {
//pinMode(SD_CS, OUTPUT); digitalWrite(SD_CS, HIGH);
Serial.begin(115200);
Serial.println("setup");
SPI.begin(VS1053_SCK, VS1053_MISO, VS1053_MOSI);
//SD.begin(SD_CS);
WiFi.disconnect();
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) delay(1500);
Serial.println("wifi verbonden");
vTaskDelay(1000);
mp3.begin();
Serial.println("mp3 gestart");
vTaskDelay(1000);
mp3.setVolume(volume);
//mp3.connecttohost("streambbr.ir-media-tec.com/berlin/mp3-128/vtuner_web_mp3/");
//mp3.connecttohost("stream.landeswelle.de/lwt/mp3-192"); // mp3 192kb/s
//mp3.connecttohost("listen.ai-radio.org:8000/320.ogg?cc=DE&now=1511557873.987&"); // ogg
//mp3.connecttohost("tophits.radiomonster.fm/320.mp3"); //bitrate 320k
//mp3.connecttohost("hellwegradiowest.radiovonhier.de/high/stream.mp3"); // Transfer Encoding: chunked

//mp3.connecttohost("https://icecast.omroepvenray.nl/lov.mp3"); // ssl
//mp3.connecttoSD("320k_test.mp3"); // SD card
mp3.connecttospeech("Wenn die Hunde schlafen, kann der Wolf gut Schafe stehlen.", "de");
Serial.println("setup einde");

}

// The loop function is called in an endless loop
void loop()
{
//Serial.println("loop");
mp3.loop();
}

End code

Tests of your examples:
mp3.connecttohost("streambbr.ir-media-tec.com/berlin/mp3-128/vtuner_web_mp3/");
mp3.connecttohost("stream.landeswelle.de/lwt/mp3-192"); // mp3 192kb/s
mp3.connecttohost("listen.ai-radio.org:8000/320.ogg?cc=DE&now=1511557873.987&"); // ogg
mp3.connecttohost("tophits.radiomonster.fm/320.mp3"); //bitrate 320k
mp3.connecttohost("hellwegradiowest.radiovonhier.de/high/stream.mp3"); // Transfer Encoding: chunked
mp3.connecttohost("https://icecast.omroepvenray.nl/lov.mp3"); // ssl
NOT TESTED >>> mp3.connecttoSD("320k_test.mp3"); // SD card
mp3.connecttospeech("Wenn die Hunde schlafen, kann der Wolf gut Schafe stehlen.", "de");

mp3.connecttohost("streambbr.ir-media-tec.com/berlin/mp3-128/vtuner_web_mp3/");
Does not work
DEBUG: Request streambbr.ir-media-tec.com/berlin/mp3-128/vtuner_web_mp3/ failed!

Executing task: C:\Users\berga.platformio\penv\Scripts\platformio.exe device monitor <

--- Available filters and text transformations: colorize, debug, default, direct, esp32_exception_decoder, hexlify, log2file, nocontrol, printable, send_on_enter, time
--- More details at https://bit.ly/pio-monitor-filters
--- Miniterm on COM4 115200,8,N,1 ---
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
setup
[ 84][E][esp32-hal-cpu.c:110] addApbChangeCallback(): duplicate func=400DBD5C arg=3FFBDBCC
wifi verbonden
mp3 gestart
DEBUG: Song stopped incorrectly!
DEBUG: after sond stopped incorrectly
DEBUG: REG dec bin hex
DEBUG: ----------- ------- ---------------- -------
DEBUG: MODE 02056 0000100000001000 0808
DEBUG: STATUS 00051 0000000000110011 0033
DEBUG: BASS 00000 0000000000000000 0000
DEBUG: CLOCKF 24576 0110000000000000 6000
DEBUG: DECODE_TIME 00000 0000000000000000 0000
DEBUG: AUDATA 08000 0001111101000000 1F40
DEBUG: WRAM 04369 0001000100010001 FFFF
DEBUG: WRAMADDR 22528 0101100000000000 5800
DEBUG: HDAT0 00000 0000000000000000 0000
DEBUG: HDAT1 00000 0000000000000000 0000
DEBUG: AIADDR 00000 0000000000000000 0000
DEBUG: VOL 07710 0001111000011110 1E1E
DEBUG: AICTRL0 00000 0000000000000000 0000
DEBUG: AICTRL1 00000 0000000000000000 0000
DEBUG: AICTRL2 00000 0000000000000000 0000
DEBUG: AICTRL3 00000 0000000000000000 0000
DEBUG: PSRAM not found, inputBufferSize: 11903 bytes
DEBUG: Connect to new host: "streambbr.ir-media-tec.com/berlin/mp3-128/vtuner_web_mp3/"
DEBUG: Connect to "streambbr.ir-media-tec.com" on port 80, extension "/berlin/mp3-128/vtuner_web_mp3/"
We gaan verbinden met <<<streambbr.ir-media-tec.com>>>.
DEBUG: Request streambbr.ir-media-tec.com/berlin/mp3-128/vtuner_web_mp3/ failed!
STATION:
STREAMTITLE:
Homepage:
setup einde

mp3.connecttohost("stream.landeswelle.de/lwt/mp3-192"); // mp3 192kb/s
Does not work
DEBUG: Request stream.landeswelle.de/lwt/mp3-192 failed!

Executing task: C:\Users\berga.platformio\penv\Scripts\platformio.exe device monitor <

--- Available filters and text transformations: colorize, debug, default, direct, esp32_exception_decoder, hexlify, log2file, nocontrol, printable, send_on_enter, time
--- More details at https://bit.ly/pio-monitor-filters
--- Miniterm on COM4 115200,8,N,1 ---
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
setup
[ 84][E][esp32-hal-cpu.c:110] addApbChangeCallback(): duplicate func=400DBD5C arg=3FFBDBCC
wifi verbonden
mp3 gestart
DEBUG: Song stopped incorrectly!
DEBUG: after sond stopped incorrectly
DEBUG: REG dec bin hex
DEBUG: ----------- ------- ---------------- -------
DEBUG: MODE 02056 0000100000001000 0808
DEBUG: STATUS 00051 0000000000110011 0033
DEBUG: BASS 00000 0000000000000000 0000
DEBUG: CLOCKF 24576 0110000000000000 6000
DEBUG: DECODE_TIME 00000 0000000000000000 0000
DEBUG: AUDATA 08000 0001111101000000 1F40
DEBUG: WRAM 04369 0001000100010001 FFFF
DEBUG: WRAMADDR 22528 0101100000000000 5800
DEBUG: HDAT0 00000 0000000000000000 0000
DEBUG: HDAT1 00000 0000000000000000 0000
DEBUG: AIADDR 00000 0000000000000000 0000
DEBUG: VOL 07710 0001111000011110 1E1E
DEBUG: AICTRL0 00000 0000000000000000 0000
DEBUG: AICTRL1 00000 0000000000000000 0000
DEBUG: AICTRL2 00000 0000000000000000 0000
DEBUG: AICTRL3 00000 0000000000000000 0000
DEBUG: PSRAM not found, inputBufferSize: 11903 bytes
DEBUG: Connect to new host: "stream.landeswelle.de/lwt/mp3-192"
DEBUG: Connect to "stream.landeswelle.de" on port 80, extension "/lwt/mp3-192"
We gaan verbinden met <<<stream.landeswelle.de>>>.
DEBUG: Request stream.landeswelle.de/lwt/mp3-192 failed!
STATION:
STREAMTITLE:
Homepage:
setup einde

mp3.start often took a long time.
Disabling loadUserCode(); // load in VS1053B if you want to play flac solved that.

//
// UITGEZET 20220630 loadUserCode
// loadUserCode(); // load in VS1053B if you want to play flac
//

mp3.connecttohost("listen.ai-radio.org:8000/320.ogg?cc=DE&now=1511557873.987&"); // ogg
Does not work
DEBUG: Request listen.ai-radio.org:8000/320.ogg?cc=DE&now=1511557873.987& failed!

Executing task: C:\Users\berga.platformio\penv\Scripts\platformio.exe device monitor <

--- Available filters and text transformations: colorize, debug, default, direct, esp32_exception_decoder, hexlify, log2file, nocontrol, printable, send_on_enter, time
--- More details at https://bit.ly/pio-monitor-filters
--- Miniterm on COM4 115200,8,N,1 ---
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
tsetup
[ 84][E][esp32-hal-cpu.c:110] addApbChangeCallback(): duplicate func=400DBCD8 arg=3FFBDBCC
wifi verbonden
mp3 gestart
DEBUG: Song stopped incorrectly!
DEBUG: after sond stopped incorrectly
DEBUG: REG dec bin hex
DEBUG: ----------- ------- ---------------- -------
DEBUG: MODE 02056 0000100000001000 0808
DEBUG: STATUS 00051 0000000000110011 0033
DEBUG: BASS 00000 0000000000000000 0000
DEBUG: CLOCKF 24576 0110000000000000 6000
DEBUG: DECODE_TIME 00000 0000000000000000 0000
DEBUG: AUDATA 44101 1010110001000101 AC45
DEBUG: WRAM 00081 0000000000010001 0051
DEBUG: WRAMADDR 07686 0001111000000110 1E06
DEBUG: HDAT0 00000 0000000000000000 0000
DEBUG: HDAT1 00000 0000000000000000 0000
DEBUG: AIADDR 00000 0000000000000000 0000
DEBUG: VOL 07710 0001111000011110 1E1E
DEBUG: AICTRL0 00000 0000000000000000 0000
DEBUG: AICTRL1 00000 0000000000000000 0000
DEBUG: AICTRL2 00000 0000000000000000 0000
DEBUG: AICTRL3 00000 0000000000000000 0000
DEBUG: PSRAM not found, inputBufferSize: 11903 bytes
DEBUG: Connect to new host: "listen.ai-radio.org:8000/320.ogg?cc=DE&now=1511557873.987&"
DEBUG: Connect to "listen.ai-radio.org" on port 8000, extension "/320.ogg?cc=DE&now=1511557873.987&"
We gaan verbinden met <<<listen.ai-radio.org>>>.
DEBUG: Request listen.ai-radio.org:8000/320.ogg?cc=DE&now=1511557873.987& failed!
STATION:
STREAMTITLE:
Homepage:
setup einde

mp3.connecttohost("tophits.radiomonster.fm/320.mp3"); //bitrate 320k
Does not work
DEBUG: Request tophits.radiomonster.fm/320.mp3 failed!

Executing task: C:\Users\berga.platformio\penv\Scripts\platformio.exe device monitor <

--- Available filters and text transformations: colorize, debug, default, direct, esp32_exception_decoder, hexlify, log2file, nocontrol, printable, send_on_enter, time
--- More details at https://bit.ly/pio-monitor-filters
--- Miniterm on COM4 115200,8,N,1 ---
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
setup
[ 84][E][esp32-hal-cpu.c:110] addApbChangeCallback(): duplicate func=400DBCFC arg=3FFBDBCC
wifi verbonden
mp3 gestart
DEBUG: Song stopped incorrectly!
DEBUG: after sond stopped incorrectly
DEBUG: REG dec bin hex
DEBUG: ----------- ------- ---------------- -------
DEBUG: MODE 02056 0000100000001000 0808
DEBUG: STATUS 00051 0000000000110011 0033
DEBUG: BASS 00000 0000000000000000 0000
DEBUG: CLOCKF 24576 0110000000000000 6000
DEBUG: DECODE_TIME 00000 0000000000000000 0000
DEBUG: AUDATA 44101 1010110001000101 AC45
DEBUG: WRAM 00081 0010000001010001 2051
DEBUG: WRAMADDR 07686 0001111000000110 1E06
DEBUG: HDAT0 00000 0000000000000000 0000
DEBUG: HDAT1 00000 0000000000000000 0000
DEBUG: AIADDR 00000 0000000000000000 0000
DEBUG: VOL 07710 0001111000011110 1E1E
DEBUG: AICTRL0 00000 0000000000000000 0000
DEBUG: AICTRL1 00000 0000000000000000 0000
DEBUG: AICTRL2 00000 0000000000000000 0000
DEBUG: AICTRL3 00000 0000000000000000 0000
DEBUG: PSRAM not found, inputBufferSize: 11903 bytes
DEBUG: Connect to new host: "tophits.radiomonster.fm/320.mp3"
hostwoext: tophits.radiomonster.fm
extension /320.mp3
DEBUG: Connect to "tophits.radiomonster.fm" on port 80, extension "/320.mp3"
We gaan verbinden met <<<tophits.radiomonster.fm>>>.
DEBUG: Request tophits.radiomonster.fm/320.mp3 failed!
STATION:
STREAMTITLE:
Homepage:
setup einde

mp3.connecttohost("hellwegradiowest.radiovonhier.de/high/stream.mp3"); // Transfer Encoding: chunked
Does not work
DEBUG: Request hellwegradiowest.radiovonhier.de/high/stream.mp3 failed!

Executing task: C:\Users\berga.platformio\penv\Scripts\platformio.exe device monitor <

--- Available filters and text transformations: colorize, debug, default, direct, esp32_exception_decoder, hexlify, log2file, nocontrol, printable, send_on_enter, time
--- More details at https://bit.ly/pio-monitor-filters
--- Miniterm on COM4 115200,8,N,1 ---
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
esetup
[ 84][E][esp32-hal-cpu.c:110] addApbChangeCallback(): duplicate func=400DBCFC arg=3FFBDBCC
wifi verbonden
mp3 gestart
DEBUG: Song stopped incorrectly!
DEBUG: after sond stopped incorrectly
DEBUG: REG dec bin hex
DEBUG: ----------- ------- ---------------- -------
DEBUG: MODE 02056 0000100000001000 0808
DEBUG: STATUS 00051 0000000000110011 0033
DEBUG: BASS 00000 0000000000000000 0000
DEBUG: CLOCKF 24576 0110000000000000 6000
DEBUG: DECODE_TIME 00000 0000000000000000 0000
DEBUG: AUDATA 44101 1010110001000101 AC45
DEBUG: WRAM 00081 0010000000010001 0051
DEBUG: WRAMADDR 07686 0001111000000110 1E06
DEBUG: HDAT0 00000 0000000000000000 0000
DEBUG: HDAT1 00000 0000000000000000 0000
DEBUG: AIADDR 00000 0000000000000000 0000
DEBUG: VOL 07710 0001111000011110 1E1E
DEBUG: AICTRL0 00000 0000000000000000 0000
DEBUG: AICTRL1 00000 0000000000000000 0000
DEBUG: AICTRL2 00000 0000000000000000 0000
DEBUG: AICTRL3 00000 0000000000000000 0000
DEBUG: PSRAM not found, inputBufferSize: 11903 bytes
DEBUG: Connect to new host: "hellwegradiowest.radiovonhier.de/high/stream.mp3"
hostwoext: hellwegradiowest.radiovonhier.de
extension /high/stream.mp3
DEBUG: Connect to "hellwegradiowest.radiovonhier.de" on port 80, extension "/high/stream.mp3"
We gaan verbinden met <<<hellwegradiowest.radiovonhier.de>>>.
[ 6266][E][WiFiGeneric.cpp:1360] hostByName(): DNS Failed for hellwegradiowest.radiovonhier.de
DEBUG: Request hellwegradiowest.radiovonhier.de/high/stream.mp3 failed!
STATION:
STREAMTITLE:
Homepage:
setup einde

mp3.connecttohost("https://icecast.omroepvenray.nl/lov.mp3"); // ssl
Works !!!!!!

Executing task: C:\Users\berga.platformio\penv\Scripts\platformio.exe device monitor <

--- Available filters and text transformations: colorize, debug, default, direct, esp32_exception_decoder, hexlify, log2file, nocontrol, printable, send_on_enter, time
--- More details at https://bit.ly/pio-monitor-filters
--- Miniterm on COM4 115200,8,N,1 ---
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
setup
[ 84][E][esp32-hal-cpu.c:110] addApbChangeCallback(): duplicate func=400DBCFC arg=3FFBDBCC
wifi verbonden
mp3 gestart
DEBUG: Song stopped incorrectly!
DEBUG: after sond stopped incorrectly
DEBUG: REG dec bin hex
DEBUG: ----------- ------- ---------------- -------
DEBUG: MODE 02056 0000100000001000 0808
DEBUG: STATUS 00051 0000000000110011 0033
DEBUG: BASS 00000 0000000000000000 0000
DEBUG: CLOCKF 24576 0110000000000000 6000
DEBUG: DECODE_TIME 00000 0000000000000000 0000
DEBUG: AUDATA 44101 1010110001000101 AC45
DEBUG: WRAM 00081 0000000000010001 0051
DEBUG: WRAMADDR 07686 0001111000000110 1E06
DEBUG: HDAT0 00000 0000000000000000 0000
DEBUG: HDAT1 00000 0000000000000000 0000
DEBUG: AIADDR 00000 0000000000000000 0000
DEBUG: VOL 07710 0001111000011110 1E1E
DEBUG: AICTRL0 00000 0000000000000000 0000
DEBUG: AICTRL1 00000 0000000000000000 0000
DEBUG: AICTRL2 00000 0000000000000000 0000
DEBUG: AICTRL3 00000 0000000000000000 0000
DEBUG: PSRAM not found, inputBufferSize: 11903 bytes
DEBUG: Connect to new host: "https://icecast.omroepvenray.nl/lov.mp3"
hostwoext: icecast.omroepvenray.nl
extension /lov.mp3
DEBUG: Connect to "icecast.omroepvenray.nl" on port 443, extension "/lov.mp3"
We gaan verbinden met <<<icecast.omroepvenray.nl>>>.
DEBUG: SSL has been established in 7833 ms, free Heap: 201696 bytes
setup einde
DEBUG: HTTP/1.0 200 OK
DEBUG: server: Icecast 2.4.4
DEBUG: date: Thu, 30 Jun 2022 13:36:55 GMT
DEBUG: content-type: audio/mpeg, format is mp3
DEBUG: icy-metadata:1
DEBUG: icy-name: Omroep Venray
STATION: Omroep Venray
DEBUG: Switch to DATA, metaint is 16000
lastURL: https://icecast.omroepvenray.nl/lov.mp3
Homepage:
DEBUG: stream ready
DEBUG: buffer filled in 9 ms
DEBUG: StreamTitle='BASTILLE - REMIND ME'
STREAMTITLE: BASTILLE - REMIND ME
DEBUG: slow stream, dropouts are possible
DEBUG: slow stream, dropouts are possible
DEBUG: slow stream, dropouts are possible
DEBUG: slow stream, dropouts are possible
DEBUG: slow stream, dropouts are possible
DEBUG: slow stream, dropouts are possible
DEBUG: slow stream, dropouts are possible
DEBUG: slow stream, dropouts are possible
DEBUG: slow stream, dropouts are possible
DEBUG: slow stream, dropouts are possible
DEBUG: slow stream, dropouts are possible
DEBUG: StreamTitle='RIHANNA - UMBRELLA'
STREAMTITLE: RIHANNA - UMBRELLA
DEBUG: slow stream, dropouts are possible
DEBUG: StreamTitle='BLACK PUMAS - COLORS'
STREAMTITLE: BLACK PUMAS - COLORS
DEBUG: slow stream, dropouts are possible
DEBUG: StreamTitle='ADINA HOWARD - FREAK LIKE ME'
STREAMTITLE: ADINA HOWARD - FREAK LIKE ME
DEBUG: StreamTitle='THE POLICE - ROXANNE'
STREAMTITLE: THE POLICE - ROXANNE
DEBUG: StreamTitle='DI RECT - THROUGH THE LOOKING GLASS'
STREAMTITLE: DI RECT - THROUGH THE LOOKING GLASS
DEBUG: slow stream, dropouts are possible
DEBUG: StreamTitle='JOE COCKER - UNCHAIN MY HEART'
STREAMTITLE: JOE COCKER - UNCHAIN MY HEART
DEBUG: slow stream, dropouts are possible
DEBUG: StreamTitle='RECLAME'
STREAMTITLE: RECLAME
DEBUG: StreamTitle='1LIMBURG HEADLINES'
STREAMTITLE: 1LIMBURG HEADLINES
DEBUG: StreamTitle='NOS JOURNAAL'
STREAMTITLE: NOS JOURNAAL
DEBUG: slow stream, dropouts are possible
DEBUG: StreamTitle='ANWB VERKEERSINFORMATIE'
STREAMTITLE: ANWB VERKEERSINFORMATIE
DEBUG: StreamTitle='RECLAME'
STREAMTITLE: RECLAME
DEBUG: StreamTitle='SHEPPARD - COMING HOME'
STREAMTITLE: SHEPPARD - COMING HOME
DEBUG: StreamTitle='MASSIVE ATTACK - UNFINISHED SYMPATHY'
STREAMTITLE: MASSIVE ATTACK - UNFINISHED SYMPATHY
DEBUG: StreamTitle='GEORGE EZRA - ANYONE FOR YOU'
STREAMTITLE: GEORGE EZRA - ANYONE FOR YOU
DEBUG: StreamTitle='ANNA KENDRICK - CUPS (PITCH PERFECTS WHEN I'M GONE)'
STREAMTITLE: ANNA KENDRICK - CUPS (PITCH PERFECTS WHEN I'M GONE)
DEBUG: StreamTitle='THE KOOKS - OOH LA'
STREAMTITLE: THE KOOKS - OOH LA
DEBUG: StreamTitle='CHAKA KHAN - I'M EVERY WOMAN'
STREAMTITLE: CHAKA KHAN - I'M EVERY WOMAN
DEBUG: StreamTitle='SWEDISH HOUSE MAFIA/THE WEEKND - MOTH TO A FLAME'
STREAMTITLE: SWEDISH HOUSE MAFIA/THE WEEKND - MOTH TO A FLAME

mp3.connecttospeech("Wenn die Hunde schlafen, kann der Wolf gut Schafe stehlen.", "de");

Executing task: C:\Users\berga.platformio\penv\Scripts\platformio.exe device monitor <

--- Available filters and text transformations: colorize, debug, default, direct, esp32_exception_decoder, hexlify, log2file, nocontrol, printable, send_on_enter, time
--- More details at https://bit.ly/pio-monitor-filters
--- Miniterm on COM4 115200,8,N,1 ---
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
setup
[ 84][E][esp32-hal-cpu.c:110] addApbChangeCallback(): duplicate func=400DBF34 arg=3FFBDBCC
wifi verbonden
mp3 gestart
DEBUG: Song stopped incorrectly!
DEBUG: after sond stopped incorrectly
DEBUG: REG dec bin hex
DEBUG: ----------- ------- ---------------- -------
DEBUG: MODE 02056 0000100000001000 0808
DEBUG: STATUS 00051 0000000000110011 0033
DEBUG: BASS 00000 0000000000000000 0000
DEBUG: CLOCKF 24576 0110000000000000 6000
DEBUG: DECODE_TIME 00000 0000000000000000 0000
DEBUG: AUDATA 44101 1010110001000101 AC45
DEBUG: WRAM 00019 0010000000010001 0051
DEBUG: WRAMADDR 07686 0001111000000110 1E06
DEBUG: HDAT0 00000 0000000000000000 0000
DEBUG: HDAT1 00000 0000000000000000 0000
DEBUG: AIADDR 00000 0000000000000000 0000
DEBUG: VOL 07710 0001111000011110 1E1E
DEBUG: AICTRL0 00000 0000000000000000 0000
DEBUG: AICTRL1 00000 0000000000000000 0000
DEBUG: AICTRL2 00000 0000000000000000 0000
DEBUG: AICTRL3 00000 0000000000000000 0000
DEBUG: PSRAM not found, inputBufferSize: 11903 bytes
DEBUG: SSL has been established, free Heap: 203156 bytes
setup einde
DEBUG: HTTP/1.1 200 OK
DEBUG: content-type: audio/mpeg, format is mp3
DEBUG: date: Thu, 30 Jun 2022 14:29:07 GMT
DEBUG: cross-origin-opener-policy: same-origin; report-to="TranslateApiHttp"
DEBUG: content-security-policy: script-src 'report-sample' 'nonce-i0sJJnuNRsVmOFRyX_NkGA' 'unsafe-inline';object-src 'none';base-uri 'self';report-uri //TranslateApiHttp/cspreport;worker-src 'self'
DEBUG: content-security-policy: require-trusted-types-for 'script';report-uri /
/TranslateApiHttp/cspreport
DEBUG: cross-origin-resource-policy: cross-origin
DEBUG: report-to: {"group":"TranslateApiHttp","max_age":2592000,"endpoints":[{"url":"https://csp.withgoogle.com/csp/report-to/TranslateApiHttp/external"}]}
DEBUG: permissions-policy: ch-ua-arch=, ch-ua-bitness=, ch-ua-full-version=, ch-ua-full-version-list=, ch-ua-model=, ch-ua-platform=, ch-ua-platform-version=*
DEBUG: accept-ch: Sec-CH-UA-Arch, Sec-CH-UA-Bitness, Sec-CH-UA-Full-Version, Sec-CH-UA-Full-Version-List, Sec-CH-UA-Model, Sec-CH-UA-Platform, Sec-CH-UA-Platform-Version
DEBUG: chunked data transfer
DEBUG: server: ESF
DEBUG: x-xss-protection: 0
DEBUG: x-frame-options: SAMEORIGIN
DEBUG: x-content-type-options: nosniff
DEBUG: alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
DEBUG: Switch to DATA, metaint is 0
lastURL: Wenn die Hunde schlafen, kann der Wolf gut Schafe stehlen.
STATION:
Homepage:
STREAMTITLE:
DEBUG: stream ready
DEBUG: buffer filled in 7 ms
DEBUG: file has no mp3 tag, skip metadata
DEBUG: Audio-Length: 19392
DEBUG: Song stopped incorrectly!
DEBUG: after sond stopped incorrectly
DEBUG: REG dec bin hex
DEBUG: ----------- ------- ---------------- -------
DEBUG: MODE 02056 0000100000001000 0808
DEBUG: STATUS 00051 0000000000110011 0033
DEBUG: BASS 00000 0000000000000000 0000
DEBUG: CLOCKF 24576 0110000000000000 6000
DEBUG: DECODE_TIME 00004 0000000000000100 0004
DEBUG: AUDATA 24000 0101110111000000 5DC0
DEBUG: WRAM 00081 0000000001010001 0051
DEBUG: WRAMADDR 07686 0001111000000110 1E06
DEBUG: HDAT0 00000 0000000000000000 0000
DEBUG: HDAT1 00000 0000000000000000 0000
DEBUG: AIADDR 00000 0000000000000000 0000
DEBUG: VOL 07710 0001111000011110 1E1E
DEBUG: AICTRL0 00000 0000000000000000 0000
DEBUG: AICTRL1 00000 0000000000000000 0000
DEBUG: AICTRL2 00000 0000000000000000 0000
DEBUG: AICTRL3 00000 0000000000000000 0000
DEBUG: End of speech: "Wenn die Hunde schlafen, kann der Wolf gut Schafe stehlen."
end of speech:Wenn die Hunde schlafen, kann der Wolf gut Schafe stehlen.

Song stopped correctly after 0 msec - PSRAM not found library wont working

I have tryed with two esp32 boards: NodeMCU and Expressif and with two mp3 decoder board vs1003/vs1053 and vs1053 but not working.

I have trouble direct after start: i need replace the wifi connection section, because example fail to connect:

const char *ssid ="..."
const char *password = "...";


WiFi.begin(ssid, password);

while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
}

Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());

I have used these pins, because with this the vs1003/vs1053 and vs1053 succesfully worked:

#define SPI_MOSI 23
#define SPI_MISO 19
#define SPI_SCK 18
#define VS1053_CS 5
#define VS1053_DCS 16
#define VS1053_DREQ 4

But whatever i do,

18:53:46.283 -> DEBUG: Song stopped correctly after 0 msec
18:53:46.283 -> DEBUG: PSRAM not found, inputBufferSize: 11903 bytes
18:53:46.283 -> DEBUG: Connect to new host: "streambbr.ir-media-tec.com/berlin/mp3-128/vtuner_web_mp3/"
18:53:46.330 -> DEBUG: Connect to "streambbr.ir-media-tec.com" on port 80, extension "/berlin/mp3-128/vtuner_web_mp3/"
18:53:46.933 -> DEBUG: Request streambbr.ir-media-tec.com/berlin/mp3-128/vtuner_web_mp3/ failed!

Looks, like others noticed, this library works only if the stars staying all in good position.

Support Some functions

Big thanks for your work! Its perfectly!

You made cool module Audio i2s. In this solution have cool methods: duration of mp3 file and seek positions in secons.

This module dont have a this methods :(

How i can get this features in VS1053 chip ?

Thanks!

p.s. i like audio i2s, but i need tone and pitch correction features (handled in vs1053)

start stop audio with network latency

128k stream where there is latency of 350ms causes very bad palyback (start stop audio) problems gets worse when the stream is high bitrate.
Depending on your location you may see the issues with this stream:

mp3.connecttohost("http://162.211.86.137:8000/stream");

Pinging 162.211.86.137 with 32 bytes of data:
Reply from 162.211.86.137: bytes=32 time=240ms TTL=48
Reply from 162.211.86.137: bytes=32 time=239ms TTL=48
Reply from 162.211.86.137: bytes=32 time=239ms TTL=48
Reply from 162.211.86.137: bytes=32 time=239ms TTL=48

The above streams play great from VLC on a PC on the same Wifi network.
I suspect more network buffers are needed.

problem mit neuen ndr streams (icecast)

seit Jahren läuft mein webradio stabil (http://ndr-njoy-live.cast.addradio.de/ndr/njoy/live/mp3/128/stream.mp3)
mit dem neuen Link (https://www.ndr.de/resources/metadaten/audio/m3u/n-joy.m3u) kann keine Verbindung hergestellt werden:
vs1053_showstation und vs1053_showstreamtitle ziegen keine Werte mehr an und es läuft kein Radio mehr.
Der NDR hat seine Links umgestellt (https://www.ndr.de/service/Die-Radio-Livestream-Links,livestreams101.html).
Die anderen Sender (außer NDR) funktionieren weiterhin.
Hat jemand ähnliche Erfahrungen/eine Lösung?

TuneIn Radio API authorization error

Bug Title:

Auth header causes 401 on Tune-in radio API

File:

vs1053_ext.cpp

Expected result:

Play radio station

Description:

When you try and use the link http://opml.radiotime.com/Tune.ashx?id=xxxxxxx, you get a 401 authorization error.

Solution:

in VS1053::connecttohost method remove the following
strcat(rqh, "Authorization: Basic ");
strcat(rqh, authorization);

Result after modification:

tune-in radio streams work

Code before

bool VS1053::connecttohost(String host){
    return connecttohost(host.c_str());
}

bool VS1053::connecttohost(const char* host, const char* user, const char* pwd) {
    // user and pwd for authentification only, can be empty

     if(host == NULL) {
        AUDIO_INFO("Hostaddress is empty");
        return false;
    }

    uint16_t lenHost = strlen(host);

    if(lenHost >= 512 - 10) {
        AUDIO_INFO("Hostaddress is too long");
        return false;
    }

    int idx = indexOf(host, "http");
    char* l_host = (char*)malloc(lenHost + 10);
    if(idx < 0){strcpy(l_host, "http://"); strcat(l_host, host); } // amend "http;//" if not found
    else       {strcpy(l_host, (host + idx));}                     // trim left if necessary

    char* h_host = NULL; // pointer of l_host without http:// or https://
    if(startsWith(l_host, "https")) h_host = strdup(l_host + 8);
    else                            h_host = strdup(l_host + 7);

    // initializationsequence
    int16_t pos_slash;                                        // position of "/" in hostname
    int16_t pos_colon;                                        // position of ":" in hostname
    int16_t pos_ampersand;                                    // position of "&" in hostname
    uint16_t port = 80;                                       // port number

    // In the URL there may be an extension, like noisefm.ru:8000/play.m3u&t=.m3u
    pos_slash     = indexOf(h_host, "/", 0);
    pos_colon     = indexOf(h_host, ":", 0);
        if(isalpha(h_host[pos_colon + 1])) pos_colon = -1; // no portnumber follows
    pos_ampersand = indexOf(h_host, "&", 0);

    char *hostwoext = NULL;                                  // "skonto.ls.lv:8002" in "skonto.ls.lv:8002/mp3"
    char *extension = NULL;                                  // "/mp3" in "skonto.ls.lv:8002/mp3"

    if(pos_slash > 1) {
        hostwoext = (char*)malloc(pos_slash + 1);
        memcpy(hostwoext, h_host, pos_slash);
        hostwoext[pos_slash] = '\0';
        uint16_t extLen =  urlencode_expected_len(h_host + pos_slash);
        extension = (char *)malloc(extLen + 20);
        memcpy(extension, h_host + pos_slash, extLen);
        urlencode(extension, extLen, true);
    }
    else{  // url has no extension
        hostwoext = strdup(h_host);
        extension = strdup("/");
    }

    if((pos_colon >= 0) && ((pos_ampersand == -1) or (pos_ampersand > pos_colon))){
        port = atoi(h_host + pos_colon + 1);// Get portnumber as integer
        hostwoext[pos_colon] = '\0';// Host without portnumber
    }

    AUDIO_INFO("Connect to new host: \"%s\"", l_host);
    setDefaults();

    if(startsWith(l_host, "https")) m_f_ssl = true;
    else                            m_f_ssl = false;

    // authentification
    uint8_t auth = strlen(user) + strlen(pwd);
    char toEncode[auth + 4];
    toEncode[0] = '\0';
    strcat(toEncode, user);
    strcat(toEncode, ":");
    strcat(toEncode, pwd);
    char authorization[base64_encode_expected_len(strlen(toEncode)) + 1];
    authorization[0] = '\0';
    b64encode((const char*)toEncode, strlen(toEncode), authorization);

    //  AUDIO_INFO("Connect to \"%s\" on port %d, extension \"%s\"", hostwoext, port, extension);

    char rqh[strlen(h_host) + strlen(authorization) + 200]; // http request header
    rqh[0] = '\0';

    strcat(rqh, "GET ");
    strcat(rqh, extension);
    strcat(rqh, " HTTP/1.1\r\n");
    strcat(rqh, "Host: ");
    strcat(rqh, hostwoext);
    strcat(rqh, "\r\n");
    strcat(rqh, "Icy-MetaData:1\r\n");
    strcat(rqh, "Authorization: Basic ");
    strcat(rqh, authorization);
    strcat(rqh, "\r\n");
    strcat(rqh, "Accept-Encoding: identity;q=1,*;q=0\r\n");
    strcat(rqh, "User-Agent: Mozilla/5.0\r\n");
    strcat(rqh, "Connection: keep-alive\r\n\r\n");
    

    if(ESP_ARDUINO_VERSION_MAJOR == 2 && ESP_ARDUINO_VERSION_MINOR == 0 && ESP_ARDUINO_VERSION_PATCH >= 3){
        m_timeout_ms_ssl = UINT16_MAX;  // bug in v2.0.3 if hostwoext is a IPaddr not a name
        m_timeout_ms = UINT16_MAX;  // [WiFiClient.cpp:253] connect(): select returned due to timeout 250 ms for fd 48
    }
    bool res = true; // no need to reconnect if connection exists

    if(m_f_ssl){ _client = static_cast<WiFiClient*>(&clientsecure); if(port == 80) port = 443;}
    else       { _client = static_cast<WiFiClient*>(&client);}

    uint32_t t = millis();
    if(m_f_Log) AUDIO_INFO("connect to %s on port %d path %s", hostwoext, port, extension);
    res = _client->connect(hostwoext, port, m_f_ssl ? m_timeout_ms_ssl : m_timeout_ms);

    if(res){
        uint32_t dt = millis() - t;
        strcpy(m_lastHost, l_host);
        AUDIO_INFO("%s has been established in %u ms, free Heap: %u bytes",
                    m_f_ssl?"SSL":"Connection", dt, ESP.getFreeHeap());
        m_f_running = true;
    }

    m_expectedCodec = CODEC_NONE;
    m_expectedPlsFmt = FORMAT_NONE;

    if(res){
        _client->print(rqh);
        if(endsWith(extension, ".mp3"))   m_expectedCodec = CODEC_MP3;
        if(endsWith(extension, ".aac"))   m_expectedCodec = CODEC_AAC;
        if(endsWith(extension, ".wav"))   m_expectedCodec = CODEC_WAV;
        if(endsWith(extension, ".m4a"))   m_expectedCodec = CODEC_M4A;
        if(endsWith(extension, ".flac"))  m_expectedCodec = CODEC_FLAC;
        if(endsWith(extension, ".asx"))  m_expectedPlsFmt = FORMAT_ASX;
        if(endsWith(extension, ".m3u"))  m_expectedPlsFmt = FORMAT_M3U;
        if(endsWith(extension, ".m3u8")) m_expectedPlsFmt = FORMAT_M3U8;
        if(endsWith(extension, ".pls"))  m_expectedPlsFmt = FORMAT_PLS;

        setDatamode(HTTP_RESPONSE_HEADER);   // Handle header
        m_streamType = ST_WEBSTREAM;
        m_f_webstream = true;
    }
    else{
        AUDIO_INFO("Request %s failed!", l_host);
        if(vs1053_showstation) vs1053_showstation("");
        if(vs1053_showstreamtitle) vs1053_showstreamtitle("");
        if(vs1053_icydescription) vs1053_icydescription("");
        if(vs1053_icyurl) vs1053_icyurl("");
        m_lastHost[0] = 0;
    }
    if(hostwoext) {free(hostwoext); hostwoext = NULL;}
    if(extension) {free(extension); extension = NULL;}
    if(l_host   ) {free(l_host);    l_host    = NULL;}
    if(h_host   ) {free(h_host);    h_host    = NULL;}
    return res;
}

Code after

bool VS1053::connecttohost(String host){
    return connecttohost(host.c_str());
}
//---------------------------------------------------------------------------------------------------------------------
bool VS1053::connecttohost(const char* host, const char* user, const char* pwd) {
    // user and pwd for authentification only, can be empty

     if(host == NULL) {
        AUDIO_INFO("Hostaddress is empty");
        return false;
    }

    uint16_t lenHost = strlen(host);

    if(lenHost >= 512 - 10) {
        AUDIO_INFO("Hostaddress is too long");
        return false;
    }

    int idx = indexOf(host, "http");
    char* l_host = (char*)malloc(lenHost + 10);
    if(idx < 0){strcpy(l_host, "http://"); strcat(l_host, host); } // amend "http;//" if not found
    else       {strcpy(l_host, (host + idx));}                     // trim left if necessary

    char* h_host = NULL; // pointer of l_host without http:// or https://
    if(startsWith(l_host, "https")) h_host = strdup(l_host + 8);
    else                            h_host = strdup(l_host + 7);

    // initializationsequence
    int16_t pos_slash;                                        // position of "/" in hostname
    int16_t pos_colon;                                        // position of ":" in hostname
    int16_t pos_ampersand;                                    // position of "&" in hostname
    uint16_t port = 80;                                       // port number

    // In the URL there may be an extension, like noisefm.ru:8000/play.m3u&t=.m3u
    pos_slash     = indexOf(h_host, "/", 0);
    pos_colon     = indexOf(h_host, ":", 0);
        if(isalpha(h_host[pos_colon + 1])) pos_colon = -1; // no portnumber follows
    pos_ampersand = indexOf(h_host, "&", 0);

    char *hostwoext = NULL;                                  // "skonto.ls.lv:8002" in "skonto.ls.lv:8002/mp3"
    char *extension = NULL;                                  // "/mp3" in "skonto.ls.lv:8002/mp3"

    if(pos_slash > 1) {
        hostwoext = (char*)malloc(pos_slash + 1);
        memcpy(hostwoext, h_host, pos_slash);
        hostwoext[pos_slash] = '\0';
        uint16_t extLen =  urlencode_expected_len(h_host + pos_slash);
        extension = (char *)malloc(extLen + 20);
        memcpy(extension, h_host + pos_slash, extLen);
        urlencode(extension, extLen, true);
    }
    else{  // url has no extension
        hostwoext = strdup(h_host);
        extension = strdup("/");
    }

    if((pos_colon >= 0) && ((pos_ampersand == -1) or (pos_ampersand > pos_colon))){
        port = atoi(h_host + pos_colon + 1);// Get portnumber as integer
        hostwoext[pos_colon] = '\0';// Host without portnumber
    }

    AUDIO_INFO("Connect to new host: \"%s\"", l_host);
    setDefaults();

    if(startsWith(l_host, "https")) m_f_ssl = true;
    else                            m_f_ssl = false;

    // authentification
    uint8_t auth = strlen(user) + strlen(pwd);
    char toEncode[auth + 4];
    toEncode[0] = '\0';
    strcat(toEncode, user);
    strcat(toEncode, ":");
    strcat(toEncode, pwd);
    char authorization[base64_encode_expected_len(strlen(toEncode)) + 1];
    authorization[0] = '\0';
    b64encode((const char*)toEncode, strlen(toEncode), authorization);

    //  AUDIO_INFO("Connect to \"%s\" on port %d, extension \"%s\"", hostwoext, port, extension);

    char rqh[strlen(h_host) + strlen(authorization) + 200]; // http request header
    rqh[0] = '\0';

    strcat(rqh, "GET ");
    strcat(rqh, extension);
    strcat(rqh, " HTTP/1.1\r\n");
    strcat(rqh, "Host: ");
    strcat(rqh, hostwoext);
    strcat(rqh, "\r\n");
    strcat(rqh, "Icy-MetaData:1\r\n");
    strcat(rqh, "\r\n");
    strcat(rqh, "Accept-Encoding: identity;q=1,*;q=0\r\n");
    strcat(rqh, "User-Agent: Mozilla/5.0\r\n");
    strcat(rqh, "Connection: keep-alive\r\n\r\n");
    

    if(ESP_ARDUINO_VERSION_MAJOR == 2 && ESP_ARDUINO_VERSION_MINOR == 0 && ESP_ARDUINO_VERSION_PATCH >= 3){
        m_timeout_ms_ssl = UINT16_MAX;  // bug in v2.0.3 if hostwoext is a IPaddr not a name
        m_timeout_ms = UINT16_MAX;  // [WiFiClient.cpp:253] connect(): select returned due to timeout 250 ms for fd 48
    }
    bool res = true; // no need to reconnect if connection exists

    if(m_f_ssl){ _client = static_cast<WiFiClient*>(&clientsecure); if(port == 80) port = 443;}
    else       { _client = static_cast<WiFiClient*>(&client);}

    uint32_t t = millis();
    if(m_f_Log) AUDIO_INFO("connect to %s on port %d path %s", hostwoext, port, extension);
    res = _client->connect(hostwoext, port, m_f_ssl ? m_timeout_ms_ssl : m_timeout_ms);

    if(res){
        uint32_t dt = millis() - t;
        strcpy(m_lastHost, l_host);
        AUDIO_INFO("%s has been established in %u ms, free Heap: %u bytes",
                    m_f_ssl?"SSL":"Connection", dt, ESP.getFreeHeap());
        m_f_running = true;
    }

    m_expectedCodec = CODEC_NONE;
    m_expectedPlsFmt = FORMAT_NONE;

    if(res){
        _client->print(rqh);
        if(endsWith(extension, ".mp3"))   m_expectedCodec = CODEC_MP3;
        if(endsWith(extension, ".aac"))   m_expectedCodec = CODEC_AAC;
        if(endsWith(extension, ".wav"))   m_expectedCodec = CODEC_WAV;
        if(endsWith(extension, ".m4a"))   m_expectedCodec = CODEC_M4A;
        if(endsWith(extension, ".flac"))  m_expectedCodec = CODEC_FLAC;
        if(endsWith(extension, ".asx"))  m_expectedPlsFmt = FORMAT_ASX;
        if(endsWith(extension, ".m3u"))  m_expectedPlsFmt = FORMAT_M3U;
        if(endsWith(extension, ".m3u8")) m_expectedPlsFmt = FORMAT_M3U8;
        if(endsWith(extension, ".pls"))  m_expectedPlsFmt = FORMAT_PLS;

        setDatamode(HTTP_RESPONSE_HEADER);   // Handle header
        m_streamType = ST_WEBSTREAM;
        m_f_webstream = true;
    }
    else{
        AUDIO_INFO("Request %s failed!", l_host);
        if(vs1053_showstation) vs1053_showstation("");
        if(vs1053_showstreamtitle) vs1053_showstreamtitle("");
        if(vs1053_icydescription) vs1053_icydescription("");
        if(vs1053_icyurl) vs1053_icyurl("");
        m_lastHost[0] = 0;
    }
    if(hostwoext) {free(hostwoext); hostwoext = NULL;}
    if(extension) {free(extension); extension = NULL;}
    if(l_host   ) {free(l_host);    l_host    = NULL;}
    if(h_host   ) {free(h_host);    h_host    = NULL;}
    return res;
}

How to save mp3 file in sd card downloaded from API.

Hi , First of all thank you for the library, it helps me a lot. But my half work is getting done here that playing mp3 saved in sd card. But my work have two steps

  1. Save mp3 file in sd card from an api
  2. Play that mp3 file

So my 2nd step is completed but I am stucked with first one, like download the mp3 file firs and save it in sd card.

Could you please help me out.

Regards
Rajbir

getAudioCurrentTime

hi dear schreibfaul
thanks for your great work !
i studied your source code for ESP32-audioI2S
if possible please bring getAudioCurrentTime to vs1053

URL that needs login and password - How to

Fantastic project. Thanks.
But i neew to open a stream with login en password.

In WinAmp this work url/loginname/password
Then it opens a window to edit/fill in the login:password (that format).

How can i tackle this problem?

Thanks ahead.
[email protected]

BBC Radio streams do not work - can anyone help?

Stream lost/cracky after a while

Hi,
is there anything i can do so that my streams are not getting lost completely/cracky after a while (hours).
Sometimes it still works even when i had the system running over several hours...but its not like the system is a 24/7 approach.

Using ESP32 Matrix Core, and a 128kbit Austrian Ö3 stream.

Any tuning i could try. Is there any parameter to set buffer length? have seen something in different adafruit library but not sure how to get this working.

Cheers,
Norbert

Song always stops incorrectly

Hi there.

I'd like to ask regarding this issue that I have, every time I try and use the library to play MP3 audio, it doesn't work, and the Song stopped incorrectly! error is always returned.
Here's a debug example.

19:58:01.060 -> ⸮⸮�⸮�⸮⸮⸮�%⸮⸮⸮LA%]A⸮0xee
19:58:01.060 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
19:58:01.060 -> mode:DIO, clock div:1
19:58:01.060 -> load:0x3fff0030,len:1184
19:58:01.145 -> load:0x40078000,len:12804
19:58:01.145 -> ho 0 tail 12 room 4
19:58:01.145 -> load:0x40080400,len:3032
19:58:01.145 -> entry 0x400805e4
19:58:09.247 -> DEBUG:        Connect to new host: "http://icecast.radiofrance.fr/francemusique-midfi.mp3"
19:58:11.271 -> DEBUG:        Song stopped incorrectly!
19:58:11.271 -> DEBUG:        after song stopped incorrectly
19:58:11.271 -> DEBUG:        REG            dec      bin               hex
19:58:11.271 -> DEBUG:        -----------  -------  ----------------  -------
19:58:11.271 -> DEBUG:        MODE          02056   0000100000001000   0808
19:58:11.271 -> DEBUG:        STATUS        00048   0000000000110000   0030
19:58:11.271 -> DEBUG:        BASS          00000   0000000000000000   0000
19:58:11.309 -> DEBUG:        CLOCKF        24576   0110000000000000   6000
19:58:11.309 -> DEBUG:        DECODE_TIME   00000   0000000000000000   0000
19:58:11.309 -> DEBUG:        AUDATA        44101   1010110001000101   AC45
19:58:11.309 -> DEBUG:        WRAM          00673   0000001010100001   02A0
19:58:11.309 -> DEBUG:        WRAMADDR      07686   0001111000000110   1E06
19:58:11.309 -> DEBUG:        HDAT0         00000   0000000000000000   0000
19:58:11.342 -> DEBUG:        HDAT1         00000   0000000000000000   0000
19:58:11.342 -> DEBUG:        AIADDR        00000   0000000000000000   0000
19:58:11.342 -> DEBUG:        VOL           00257   0000000100000001   0101
19:58:11.342 -> DEBUG:        AICTRL0       00000   0000000000000000   0000
19:58:11.342 -> DEBUG:        AICTRL1       00000   0000000000000000   0000
19:58:11.342 -> DEBUG:        AICTRL2       00000   0000000000000000   0000
19:58:11.342 -> DEBUG:        AICTRL3       00000   0000000000000000   0000
19:58:11.379 -> DEBUG:        PSRAM not found, inputBufferSize: 11903 bytes
19:58:11.884 -> DEBUG:        Connection has been established in 528 ms, free Heap: 249304 bytes
19:58:12.408 -> DEBUG:        chunked data transfer
19:58:12.408 -> BITRATE:      128000kBit/s
19:58:12.408 -> DEBUG:        icy-name: francemusique-midfi.mp3
19:58:12.408 -> STATION:      francemusique-midfi.mp3
19:58:12.408 -> lastURL:      http://icecast.radiofrance.fr/francemusique-midfi.mp3
19:58:12.408 -> DEBUG:        stream ready

I'm not sure why this keeps on happening. I've tried using the latest ESP32 board version, the ESP32 2.0.2 version, and it still gives the same error. I am using the example provided by the library, with the code as follows:

#include "Arduino.h"
#include "WiFi.h"
#include "SPI.h"
//#include "SD.h"
//#include "FS.h"
#include "vs1053_ext.h"

// Digital I/O used
//#define SD_CS        5
#define VS1053_MOSI   23
#define VS1053_MISO   19
#define VS1053_SCK    18
#define VS1053_CS     5
#define VS1053_DCS    21
#define VS1053_DREQ   22

String ssid = "Timothy Dillan’s iPhone";
String password = "***";

int volume=30;

VS1053 mp3(VS1053_CS, VS1053_DCS, VS1053_DREQ, VSPI, VS1053_MOSI, VS1053_MISO, VS1053_SCK);

//The setup function is called once at startup of the sketch
void setup() {
    //pinMode(SD_CS, OUTPUT);      digitalWrite(SD_CS, HIGH);
    Serial.begin(115200);
    SPI.begin(VS1053_SCK, VS1053_MISO, VS1053_MOSI);
    //SD.begin(SD_CS);
    WiFi.disconnect();
    WiFi.mode(WIFI_STA);
    WiFi.begin(ssid.c_str(), password.c_str());
    while (WiFi.status() != WL_CONNECTED) delay(1500);
    mp3.begin();
    mp3.setVolume(volume);
    mp3.connecttohost("icecast.radiofrance.fr/francemusique-midfi.mp3");
    //mp3.connecttohost("stream.landeswelle.de/lwt/mp3-192");                 // mp3 192kb/s
    //mp3.connecttohost("http://radio.hear.fi:8000/hear.ogg");                // ogg
    //mp3.connecttohost("tophits.radiomonster.fm/320.mp3");                   // bitrate 320k
    //mp3.connecttohost("http://star.jointil.net/proxy/jrn_beat?mp=/stream"); // chunked data transfer
    //mp3.connecttohost("http://stream.srg-ssr.ch/rsp/aacp_48.asx");          // asx
    //mp3.connecttohost("www.surfmusic.de/m3u/100-5-das-hitradio,4529.m3u");  // m3u
    //mp3.connecttohost("https://raw.githubusercontent.com/schreibfaul1/ESP32-audioI2S/master/additional_info/Testfiles/Pink-Panther.wav"); // webfile
    //mp3.connecttohost("http://stream.revma.ihrhls.com/zc5060/hls.m3u8");    // HLS
    //mp3.connecttohost("https://mirchiplaylive.akamaized.net/hls/live/2036929/MUM/MEETHI_Auto.m3u8"); // HLS transport stream
    //mp3.connecttoFS(SD, "320k_test.mp3"); // SD card, local file
    //mp3.connecttospeech("Wenn die Hunde schlafen, kann der Wolf gut Schafe stehlen.", "de");
}

// The loop function is called in an endless loop
void loop()
{
    mp3.loop();
}

// next code is optional:
void vs1053_info(const char *info) {                // called from vs1053
    Serial.print("DEBUG:        ");
    Serial.println(info);                           // debug infos
}
void vs1053_showstation(const char *info){          // called from vs1053
    Serial.print("STATION:      ");
    Serial.println(info);                           // Show station name
}
void vs1053_showstreamtitle(const char *info){      // called from vs1053
    Serial.print("STREAMTITLE:  ");
    Serial.println(info);                           // Show title
}
void vs1053_showstreaminfo(const char *info){       // called from vs1053
    Serial.print("STREAMINFO:   ");
    Serial.println(info);                           // Show streaminfo
}
void vs1053_eof_mp3(const char *info){              // called from vs1053
    Serial.print("vs1053_eof:   ");
    Serial.print(info);                             // end of mp3 file (filename)
}
void vs1053_bitrate(const char *br){                // called from vs1053
    Serial.print("BITRATE:      ");
    Serial.println(String(br)+"kBit/s");            // bitrate of current stream
}
void vs1053_commercial(const char *info){           // called from vs1053
    Serial.print("ADVERTISING:  ");
    Serial.println(String(info)+"sec");             // info is the duration of advertising
}
void vs1053_icyurl(const char *info){               // called from vs1053
    Serial.print("Homepage:     ");
    Serial.println(info);                           // info contains the URL
}
void vs1053_eof_speech(const char *info){           // called from vs1053
    Serial.print("end of speech:");
    Serial.println(info);
}
void vs1053_lasthost(const char *info){             // really connected URL
    Serial.print("lastURL:      ");
    Serial.println(info);
}

Unable to switch from SD > Web > SD

Hi (oder auch servus),

I like the library very much, but if it want to switch (lets assume a button event) between sources, this wont work...

I start with a .mp3 from SD in setup():
player.connecttoSD("filename.mp3");

due to a button press, i switch to:

player.begin();
player.connecttohost("http://thiscouldbeastreamurl.fm/");

and with another button press i want to switch again to SD:

player.begin();
delay(10);
player.connecttoSD("anotherfilename.mp3");

There's no more audio output anymore when switching back to SD..

If i then switch back to Webstream I'm running into this line (885ff):
if(vs1053_info) vs1053_info("Stream lost -> try new connection");

any ideas?

Thanks in advance!

MP3 Reader Example

Hi, thank you very mach for the library.!
Instructions and notes provided were of major help and using it i was able to build the webradio i was dreaming of since long time.
On the contrary in spite of my efforts i (i am a novice!) was unable to clearly understand how the mp3.loop works and therefore i was unable to build a simple but functional MP3 reader. (esp32+vs1053+CardReader+3 BUTTONS)
Using the available sketch i succeeded in playing one file at the time located in the SD using "mp3.connecttoSD("xxxxxxxx.mp3"); in the Setup section of the sketch but i don't understand how i should proceed if i want to organize a "LOOP" allowing the choice of a file among those in the SD dir (easy part) and its subsequent reproduction.
Suggestions or better an example sketch showing commands for the reproducion of a file in the loop section of the sketch would be extremely useful for newbuys like me.
Thanks in advance for a reply .

Access of GPIO > 31

You said that accessing GPIO > 31 for (D)CS is not possible ... yes, it is. I changed the lines in vs1053_ext.h:

`protected:
// Expandend beyond GPIO32. tcfkat 20210222

inline void DCS_HIGH() {(dcs_pin&0x20)?(GPIO.out1_w1ts.data=1<<(dcs_pin-32)):(GPIO.out_w1ts=1<<dcs_pin);}

inline void DCS_LOW() {(dcs_pin&0x20)?(GPIO.out1_w1tc.data=1<<(dcs_pin-32)):(GPIO.out_w1tc=1<<dcs_pin);}

inline void CS_HIGH() {(cs_pin&0x20)?(GPIO.out1_w1ts.data=1<<(cs_pin-32)):(GPIO.out_w1ts=1<<cs_pin);}

inline void CS_LOW() {(cs_pin&0x20)?(GPIO.out1_w1tc.data=1<<(cs_pin-32)):(GPIO.out_w1tc=1<<cs_pin);}`

And in vs1053_ext.cpp:

`void VS1053::begin(){

pinMode(dreq_pin, INPUT); // DREQ is an input

pinMode(cs_pin, OUTPUT); // The SCI and SDI signals

pinMode(dcs_pin, OUTPUT);

DCS_HIGH(); //Does not work for me: digitalWrite(dcs_pin, HIGH); tcfkat 20210221

CS_HIGH(); //Does not work for me: digitalWrite(cs_pin, HIGH); tcfkat 20210221`

Best regards

Exchanged original VS1053 with your extendet version, no sound

Hi

First: Wow. I am really impressed by the work, but I ran into a problem.
I used the regular VS1053.h with the same board you had, a ESPuino-32 (ESP-Wroom-32) and it worked without a problem.
With your nice work I can't get it running... :(
Only changed the pins in your example. I get a connect in the serial monitor, and my logic analyzer shows data on the SPI.
May you can help me? Any ideas? Need something to do here in Tirol.

Greetings and thanks in advance

--> Solution was simple and my bad. :( had a bad pinout on the eps32 board :(

Web radio example does not work

Hi,

I have an AZ Delivery ESP32 NodeMCU module together with a VS1053 from LC Technology. I have the following connections between both

VS1053 => ESP32

SCK => 18
MISO => 19
MOSI => 23
5V => 5V
GND => GND (not CMD!)
CS => 32
DCS => 33
DREQ => 35
RST => EN

I have the same exact setup for a project I developed using the baldram VS1053 library (https://github.com/baldram/ESP_VS1053_Library). It is playing streams just fine, but it unfortunately does not provide all this useful meta information out of the streams. Therefore, I wanted to use your library.

When starting the example sketch, I can see all this useful meta information on the serial monitor, but there is no sound coming out of the VS1053 ...

Did I do anything wrong essentially?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.