StreamOnHost: play audio on host (#359)
* StreamOnHost: actually play audio * (spaces) * fix comment * update message
This commit is contained in:
1 parent
40d0d997a8
commit
3349608b11
4 files changed
+152
-13
No files matched your search
@@ -8,7 +8,13 @@
|
||||
#include "AudioFileSourceICYStream.h"
|
||||
#include "AudioFileSourceBuffer.h"
|
||||
#include "AudioGeneratorMP3.h"
|
||||
#if AUDIO
|
||||
#pragma message("Outputting audio")
|
||||
#include "AudioOutputLinuxDSP.h"
|
||||
#else
|
||||
#pragma message("No audio")
|
||||
#include "AudioOutputNullSlow.h"
|
||||
#endif
|
||||
|
||||
// To run, set your ESP8266 build to 160MHz, update the SSID info, and upload.
|
||||
|
||||
@@ -23,6 +29,8 @@ const char* password = STAPSK;
|
||||
|
||||
// Randomly picked URL
|
||||
const char *URL="http://kvbstreams.dyndns.org:8000/wkvi-am";
|
||||
//const char *URL="http://stream2.pvpjamz.com:8706/stream";
|
||||
// that one is not well decoded:
|
||||
//const char *URL="http://icecast.radiofrance.fr/franceinter-lofi.mp3";
|
||||
|
||||
AudioGeneratorMP3 *mp3;
|
||||
@@ -82,7 +90,7 @@ void setup()
|
||||
file->RegisterMetadataCB(MDCallback, (void*)"ICY");
|
||||
buff = new AudioFileSourceBuffer(file, 2048);
|
||||
buff->RegisterStatusCB(StatusCallback, (void*)"buffer");
|
||||
out = new AudioOutputNullSlow(44100);
|
||||
out = new AudioOutputNullSlow();
|
||||
mp3 = new AudioGeneratorMP3();
|
||||
mp3->RegisterStatusCB(StatusCallback, (void*)"mp3");
|
||||
mp3->begin(buff, out);
|
||||
|
||||
Reference in new issue
Block a user