Commit Graph
24 Commits
Author SHA1 Message Date
Earle F. Philhower, III 7df1e005e5 Use same SSID/password settings as core examples (#252) 2020-04-14 22:33:10 -07:00
david gauchard aba310d3a0 webradio: example: http: gently listen to the end of the sentence before saying goodbye (#245) 2020-03-24 20:06:03 -07:00
david gauchard 4fed6a230f install and use a global audioLogger instead of Serial (#198)
* use of global audioLogger-> instead of Serial.

* default to silence

* initialize logger in examples
2019-07-24 10:02:21 -07:00
h3ndrik 4d9d010e8b Fix webradio to use buffer, not raw input streams
Thanks to @h3ndrik, again.
2018-01-31 19:20:08 -08:00
Earle F. Philhower, III 96fc37dce5 Refactor I2S to be cleaner, more extensible
With the multiple I2S modes on the ESP32, it makes sense to use a
cleaner class hierarchy for the I2S tools.  Make I2SNoDAC into a
subclass of I2S (renamed from I2SDAC) and remove about 80% of the
code which was identical exept for the per-sample bitstream synthesis.
2018-01-25 19:15:02 -08:00
Earle F. Philhower, III 93f7d90baf Update WebRadio to use prealloc'd buffers
To avoid allocations in the application, preallocate all decoder and
buffer memory in and then never free it.  Use the new pre-alloc'd
constructors to generate the playback objects.
2018-01-21 15:07:40 -08:00
Earle F. Philhower, III 94a3f9ab91 Remove hostname setting for ESP32 compatability
The examples were setting a hostname for the WiFi connection, but this is
done via a different call on the ESP32 vs. the ESP8266.  To avoid #ifdef
explosion, simply remove the call as it's unneeded anyway.

Thanks to @reaper7 for reporting this in pull #33.
2018-01-18 10:57:02 -08:00
tueddy 03aa2467f0 Porting for ESP-32 (#33)
* support ESP-32
* make compile with ESP-32/arduino platform
* fixed: use libmad on ESP8266 as original
2018-01-18 08:55:03 -08:00
Earle F. Philhower, III d06dcf1123 Include type and volume in checksum, cleanup code 2017-12-24 09:31:36 -08:00
Earle F. Philhower, III e844536251 Fix the URL max limit in web interface
The web interface has a hardcoded 64 char URL limit, even though the
actual url[] array was increased to 96 chars.  Use sizeof(url) in the
handler instead of a hardcoded number to enable use of all space.
Addresses issue #21 , again.
2017-12-22 21:39:13 -08:00
Earle F. Philhower, III 5b45a79cf7 Fix ICY decoder overflow causing streams to die 2017-12-16 16:16:01 -08:00
Earle F. Philhower, III 397aee8c19 Actually change volume in the HandleVolue callback 2017-12-15 22:18:23 -08:00
Earle F. Philhower, III 0f0b6cd664 Fix EEPROM save/load and corruption on restart
EEPROM saving was not calculating the correct checksum because it was
not clearing memory before writing.  Fix that so it automatically will
restart the connection on a reset.

There was a fatal corruption caused by improper delete'ing of objects
without clearing their pointers when the initial connection to a stream
failed.  Refactor to use the proper StopPlaying() routine.

Extend the URL to 96 characters.  We not have enough memory to do so!
2017-12-15 19:03:03 -08:00
Earle F. Philhower, III 8e94702468 Replace Stream with simple string in MD callback
@armSeb found that the stream interface caused a big slowdown and
hiccups in his playback, replace the MetadataCallback's *Stream with
a simple *char for faster operation and less overhead.
2017-12-15 12:54:49 -08:00
Earle F. Philhower, III d923ebef36 Move the callback constant strings to PMEM 2017-12-15 12:03:05 -08:00
Earle F. Philhower, III 634d0b8d02 Store AAC/MP3 flag in EEPROM for WebRadio 2017-12-15 10:31:19 -08:00
Earle F. Philhower, III 9f42358f31 Try and restart a stream 2secs after a disconnect. 2017-12-14 15:58:39 -08:00
Earle F. Philhower, III e3da480772 Add URL save and restore on reboot 2017-12-14 11:09:43 -08:00
Earle F. Philhower, III ee7febe1ec Refactor and store to EEPROM, restore on reboot
Save the current URL to EEPROM on each change, and try and restart it
after a power loss or reset
2017-12-14 10:35:14 -08:00
Earle F. Philhower, III 143c4e65ae Move request buff to stack
Save 384 heap bytes by handling the web request buffering in the loop()
stack context.
2017-12-14 09:47:00 -08:00
Earle F. Philhower, III ec4979e6f5 Fix web page update, move string to PROGMEM 2017-12-14 09:43:19 -08:00
Earle F. Philhower, III 94489c005a Use low-mem web server to save RAM for playback
Instead of ESP8266WebServer, which is something of a RAM hog and has
extensive use of Strings and allocations, use a simpler one with no
dynamic memory allocations at all, borrowed from PsychoPlug
https://github.com/earlephilhower/psychoplug.
2017-12-12 17:06:21 -08:00
Earle F. Philhower, III 3d88015cc2 Add in status update and free memory reporting
Also removed Serial.print() of status and Serial.flush() to avoid
hiccups.
2017-12-08 22:09:46 -08:00
Earle F. Philhower, III 8893ced2af Add WebRadio example, a web page controller
Simple example web interface to the player.  Can change the volume and
the station through a slider and menu box.
2017-12-08 13:07:59 -08:00