Replies: 1 comment 1 reply
-
This is probably due to a lack of memory. Please activate the PSRAM |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi I use url=http://www.wdr.de/wdrlive/media/einslive.m3u, or url=http://somafm.com/wma128/missioncontrol.asx,all is ok, but, when i use url=http://s1.knixx.fm/dein_webradio_64.aac or url=http://ngcdn016.cnr.cn/live/gsgljtgb/index.m3u8, error almost happened which is about “The AACDecoder could not be initialized”, but that both url run in pc' broswer is successful. How to resolve it, pls help!
Sketch:
`#include "Arduino.h"
#include "WiFiMulti.h"
#include "Audio.h"
#include "SPI.h"
#include "SD.h"
#include "FS.h"
// Digital I/O used
#define SD_CS 5
#define SPI_MOSI 23
#define SPI_MISO 19
#define SPI_SCK 18
#define I2S_DOUT 26
#define I2S_BCLK 27
#define I2S_LRC 25
Audio audio;
WiFiMulti wifiMulti;
String ssid = "xx";
String password = "xxxx";
void setup() {
pinMode(SD_CS, OUTPUT);
digitalWrite(SD_CS, HIGH);
SPI.begin(SPI_SCK, SPI_MISO, SPI_MOSI);
SPI.setFrequency(1000000);
Serial.begin(115200);
SD.begin(SD_CS);
WiFi.mode(WIFI_STA);
wifiMulti.addAP(ssid.c_str(), password.c_str());
wifiMulti.run();
if(WiFi.status() != WL_CONNECTED){
WiFi.disconnect(true);
wifiMulti.run();
}
audio.setPinout(I2S_BCLK, I2S_LRC, I2S_DOUT);
audio.setVolume(12); // 0...21
audio.connecttohost("http://s1.knixx.fm/dein_webradio_64.aac");//
}
void loop()
{
audio.loop();
if(Serial.available()){ // put streamURL in serial monitor
audio.stopSong();
String r=Serial.readString(); r.trim();
if(r.length()>5) audio.connecttohost(r.c_str());
log_i("free heap=%i", ESP.getFreeHeap());
}
}
// optional
void audio_info(const char *info){
Serial.print("info "); Serial.println(info);
}
void audio_id3data(const char *info){ //id3 metadata
Serial.print("id3data ");Serial.println(info);
}
void audio_eof_mp3(const char *info){ //end of file
Serial.print("eof_mp3 ");Serial.println(info);
}
void audio_showstation(const char *info){
Serial.print("station ");Serial.println(info);
}
void audio_showstreamtitle(const char *info){
Serial.print("streamtitle ");Serial.println(info);
}
void audio_bitrate(const char *info){
Serial.print("bitrate ");Serial.println(info);
}
void audio_commercial(const char *info){ //duration in sec
Serial.print("commercial ");Serial.println(info);
}
void audio_icyurl(const char *info){ //homepage
Serial.print("icyurl ");Serial.println(info);
}
void audio_lasthost(const char *info){ //stream URL played
Serial.print("lasthost ");Serial.println(info);`
Error message:
ets Jul 29 2019 12:21:46
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:4832
load:0x40078000,len:16460
load:0x40080400,len:4
load:0x40080404,len:3504
entry 0x400805cc
info PSRAM not found, inputBufferSize: 13951 bytes
info buffers freed, free Heap: 179824 bytes
info connect to: "s1.knixx.fm" on port 80 path "/dein_webradio_64.aac"
info Connection has been established in 1062 ms, free Heap: 178328 bytes
info chunked data transfer
bitrate 64000
station knixx.fm - Dein Webradio. / 64 kbp/s aac+
icyurl https://knixx.fm
info The AACDecoder could not be initialized
Beta Was this translation helpful? Give feedback.
All reactions