Commit Graph
195 Commits
Author SHA1 Message Date
Earle F. Philhower, III a4fd448143 Fix compile warnings 2020-04-15 20:37:11 -07:00
Earle F. Philhower, III 2581b82773 Update to latest FLAC sources (7a35c5284) (#256)
Merge the upstream changes to the FLAC library up to commit
7a35c528495b6d8a51e87e007f6810b5553101bc.

Shouldn't have any real impact to existing code.

Tested with the example and runs well.
2020-04-15 14:13:11 -07:00
Earle F. Philhower, III 41f70f9fd2 Merge branch 'master' of https://github.com/earlephilhower/ESP8266Audio 2020-04-15 11:35:13 -07:00
Earle F. Philhower, III 29c3f37680 Actually git add AudioFileSourceLittleFS.h
D'oh!
2020-04-15 11:34:47 -07:00
Earle F. Philhower, III 3dd872f615 Update to latest TinySoundFont (#255)
LibTinySoundFont has been modified significantly since I forked
it to do the ESP8266 edits. Update to latest merges.

Tested using the LittleFS MIDI example and seems to work well.
2020-04-15 11:28:37 -07:00
Earle F. Philhower, III 580706d7e3 Add LittleFS file source, MIDI example
LittleFS reads many times faster than SPIFFS, and is now in the ESP8266,
so include a file source for it and move the MIDI example to LittleFS.

Keep the SPIFFS as ESP32 doesn't support LittleFS yet.
2020-04-15 11:19:56 -07:00
Earle F. Philhower, III 5b8ba1681c Fix ESP32 compilation, add SPI class RAM wrapper (#254)
Seems like VSCODE and others try and compile all files in a directory,
even if they aren't used.  Because the spiram-fast had ESP8266-only
registers, it caused an error when attempting to build anything for the
ESP32.

Update by writing a new SPI class based version of the spiram-fast class
(tested on the ESP8266) which uses the SPI wrapper class.

Fixes #253
2020-04-15 10:01:24 -07:00
Earle F. Philhower, III 7df1e005e5 Use same SSID/password settings as core examples (#252) 2020-04-14 22:33:10 -07:00
Earle F. Philhower, III 0fd2d0413b Replace external SPIRAM lib w/internal optimized (#250)
* Replace external SPIRAM lib w/internal optimized

Instead of requiring everyone to download and install another Arduino
library to use this lib, include an optimized, self-contained one from
the 8266 VM PR: https://github.com/esp8266/Arduino/pull/6994

Does change the API as it now requires a HW chip select, so that
parameter is removed from the SpiRAM buffer object.

* Redo the FIFO to try and be faster

* Fix the SPI interface, buffering.

SPI FIFO needs special care so do all work in a RAM copy and the copy it
over manually w/32b writes.

Ensure the SPI command is done before touching the FIFO.

Fix buffering organization.

Make the buffer report status as a #### bar.

* Fix infinite wait on EOF

* Add SW chip select support

* Update URL to one that's live today

* Clean up metadata printout

* Clean up readme refs to obsolete lib

* Slow down the DIO->SIO reset sequence

* Update readme to remove old SPIRam library ref

Also add the resistor to the 1T circuit to avoid transistor overheating.
2020-04-14 15:41:47 -07:00
Earle F. Philhower, III be0ee8283f Free BCK and WS pins for general use with NoDAC (#251)
The BCK and WS pins aren't needed or used when using the I2SNoDAC
option.  Restore their settings to whatever they were before, leaving
them untouched.  Apps may configure the additional pins either before or
after the I2SNoDac is created.
2020-04-14 11:49:12 -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
Ivan Kostoski 9e90cd780e Fix compile error on ESP32 (#241) 2020-02-28 13:37:55 -08:00
Ivan Kostoski 377b271edd ESP8266 SinglePinI2SDriver, SPDIF output improvements, FLAC memory optimization (#237)
* Added S/PDIF output using I2S peripheral

* Added AudioOutputSPDIF to README and PROGMEM changes

* SPDIF/I2S sample rate fixes

* Fix SPDIF example file name

* Minimal (single pin) I2S driver

* AudioOutputSPDIF changes for minimal I2S driver

* Documentation changes

* FLAC decoding memory optimization
2020-02-24 09:55:30 -08:00
Ivan Kostoski a7a8b917d2 Added S/PDIF output using I2S peripheral (#235)
* Added S/PDIF output using I2S peripheral

* Added AudioOutputSPDIF to README and PROGMEM changes
2020-02-07 13:05:03 -08:00
Earle F. Philhower, III 2c52aeaf44 Add -Wall to CI process 2019-12-31 12:21:59 -08:00
Earle F. Philhower, III 6b3e8cf891 Remove esp32 build for now
The ESP32 CI system has moved to the GH CI, from TravisCI.  The repo
also uses Python2 and not Python3.  These two combine to make the
existing ESP32 CI scripts almost unrunnable on the TravisCI instance
we're using.

Drop them for now, but hopefully we'll be able to reintegrate them at
some point in the future
2019-12-31 12:12:38 -08:00
Earle F. Philhower, III 7c7fd1375e Attempt to update ESP32 CI build process
Manually implement the GH scripts that are now used in the ESP32 repo,
overriding the shared method we used to use between the 8266 and 32.
2019-12-31 11:40:01 -08:00
Earle F. Philhower, III 1d6186b4b2 Make host tests compile again 2019-12-31 11:00:30 -08:00
Christian Ferbar 074dfd47b0 Allow playing wav files via HTTPStream (#224)
* ReadWAVInfo(): print error message if seek() fails

* AudioFileSourceHTTPStream::seek() print error message - not implemented

* AudioFileSourceBuffer::seek if SEEK_CUR and seek_len < writePtr keep the buffer (fix for HTTPStream)

* Update AudioFileSourceBuffer.cpp
2019-11-24 08:52:50 -07:00
Ryan Jacobs 16bd2a7b06 enable syntax highlighting on README.md (#214) 2019-11-18 08:49:58 -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
philippe44 598163dd59 AAC endianness (#191) 2019-06-20 15:38:32 -07:00
bootrino abee116aa2 Added failure messages to ReadWAVInfo, also handled JUNK in WAV (#171)
* Modified ReadWAVInfo method to give meaingful messages to Serial when it cannot read a WAV file, and also added code to handle WAV files that contain JUNK data, which is a valid part of the WAV specification.

* Added error messages to ReadWAVInfo function using Serial.printf_P(PSTR(
Added error messages to begin function using Serial.printf_P(PSTR(
Implemented skipping through JUNK (as defined in the WAV specification), if present in the WAV file.

* Added new lines to error messages in the "begin" function
2019-05-12 08:32:40 -07:00
Simon L e6a4e6c886 Document the internal DAC on ESP32 more explicitly (#184)
* Document INTERNAL_DAC explicitly and its usage

* Add INTERNAL_DAC usage comment in example
2019-05-12 08:31:08 -07:00
Earle F. Philhower, III d0089c1f4a Fix ESP32 compile 2019-04-13 17:40:28 -07:00
Earle F. Philhower, III c075835c07 Re-add missing SPIFFS file source wrapper 2019-04-13 16:55:27 -07:00
Earle F. Philhower, III 65220b8e31 Add a AudioFileSourceFS object
Allow passing in SDFS, LittleFS, or SPIFFS to access files for the audio
playback.
2019-04-13 16:09:21 -07:00
Earle F. Philhower, III 22b52e0ed5 Fix MOD clipping, bad output
MODs were saturating because the audio was being scaled 2x too high for
output.  Simple fix dramatically increases quality of sample output.
2019-04-13 13:31:41 -07:00
Earle F. Philhower, III a781eef59c Rewrite ICY metadata parser to be faster
The ICY metadata parsing was very slow because of bytewise reading from
web stream.  Use a more convoluted, but faster, chunked method.
2019-04-12 20:29:48 -07:00
h3ndrik 2c5ae5d490 don't try to read 0 bytes if we hit the icy block (fixes #124) (#125)
* don't try to read 0 bytes if we hit the icy block

* make sure size isn't negative
2019-04-12 16:21:00 -07:00
Maigre 87fbcadd80 Call output->stop() when stopping generators (#174)
* Fix hanging sound on WAV stop for ESP32

* Fix hanging sound on AAC stop for ESP32

* Fix hanging sound on MIDI stop for ESP32

* Fix hanging sound on MOD stop for ESP32

* Fix hanging sound on MP3a stop for ESP32

* Fix hanging sound on RTTTL stop for ESP32
2019-04-12 16:17:10 -07:00
Earle F. Philhower, III 814ec61fa7 Fix CI test to get all submodules in the Arduino tree 2019-04-12 15:58:50 -07:00
Earle F. Philhower, III ce9f023592 Add'l warning removal 2019-04-12 15:49:55 -07:00
Earle F. Philhower, III 2d8a97767c Update to remove warnings, fix new 8266 core rev
Remove build warnings and use the faster pgm_read_*_aligned macros to
update to the latest ESP8266 Arduino core.
2019-04-12 15:45:34 -07:00
Earle F. Philhower, III 2f2898c496 Fix header protector 2018-11-27 18:12:38 -08:00
Earle F. Philhower, III 71ec0d590b Add in PIO dependencies and bump revision num. 2018-09-11 09:37:40 -07:00
h3ndrik 135e912f3e increase max buffer size beyond 64k (#117)
The ESP32 can easily handle a buffer size greater than UINT16_MAX (64KB)
so make the size an uint32_t.
2018-08-20 07:53:59 -07:00
h3ndrik c6ee72e9db make dma_buf_count configurable by user, so we can have a larger dma buffer on ESP32 (#106)
* make dma_buf_count configurable by user, so we can have a larger dma buffer on esp32

* fix comment about interrupt priority (see esp-idf documentation system/intr_alloc)
2018-08-20 07:49:42 -07:00
Earle F. Philhower, III ff18640db7 Update rev # for PlatformIO 2018-08-05 13:29:51 -07:00
Earle F. Philhower, III 955b1d29b2 Fix WAV header decode, add WAV host test
Fixes #114

Adobe Audition WAV files have a slightly different but legal header
format.  Enable that format (only for PCM, not a/ulaw or anything else)
to be decoedd properly.

Add in a WAV object test that can run on hosts and valgrind.
2018-08-03 12:02:52 -07:00
h3ndrik 4c8cc0a591 replace esp32s i2s_push_sample() (#116)
as it is deprecated and changed behaviour between esp-idf v2.0 and v3.0. this fixes the chipmunks in #110 and #105
2018-08-03 08:01:57 -07:00
per1234 88ce6c9476 Use a single tab field separator in keywords.txt (#107)
Each field of keywords.txt is separated by a single true tab. When you use multiple tabs it causes the field to be interpreted as empty. On Arduino IDE 1.6.5 and newer an empty KEYWORD_TOKENTYPE causes the default editor.function.style coloration to be used (as with KEYWORD2, KEYWORD3, LITERAL2). On Arduino IDE 1.6.4 and older it causes the keyword to not be recognized for any special coloration.

Reference:
https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#keywords
2018-07-15 10:56:07 -07:00
Earle F. Philhower, III c0ec26169c Fix buffer overflow in ID3 decode
When the ID3 tag had >64 bytes of data for an element, there was a
1-byte out of bounds access, causing a crash at some later point in
time.  Properly limit writes to the ID3 field buffer.

Fixes #104
2018-07-11 16:03:39 -07:00
Earle F. Philhower, III 1f481a993a Bump version to 1.1 to make PIO grab latest 2018-07-10 12:30:59 -07:00
Earle F. Philhower, III 0987b12e58 Fix 8->16 bit output conversion overflow error
The I2S outputs were converting samples in the buffer passed in
from u8->s16 on every call.  When the I2S was full, however, the
sample would not get pushed and the output function would be
called at a later time with the same buffer...which was already
at 16 bits.  It'd be converted again and turned into a high
frequency noise on the output.

Now only modify a copy of the input sample in I2S and I2SNoDAC.
Fixes the conversion problem competely.

Fixes #2
2018-05-23 22:40:29 -07:00
Earle F. Philhower, III b9be5c69dd Add warning about amplified speakers on 1T 2018-05-23 08:56:08 -07:00
Earle F. Philhower, III 8684cbc42f Add linear clock note 2018-05-23 08:20:28 -07:00
Earle F. Philhower, III 8489f6990d Add I2S debug/wiring notes 2018-05-15 07:22:49 -07:00
Earle F. Philhower, III 34046a3ae0 Explicitly reference SPIFFS namespace File
Ensure we grap the SPIFFS version of file by prepending the fs:: to
the File local object.  Fixes #93.
2018-05-15 07:04:42 -07:00
Trailhead 7f5ad4f61c fixing typo in README.md (#96) 2018-05-15 06:41:10 -07:00