Commit Graph
171 Commits
Author SHA1 Message Date
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
Earle F. Philhower, III a4610346a6 New use case byu CosmicMac 2018-04-02 14:20:57 -07:00
Earle F. Philhower, III bc87dca1be Add JohannesMTC link 2018-04-01 19:09:38 -07:00
Earle F. Philhower, III 898e960319 Use plain square wave, 8192 amplitude (25%) volume
An I2S bug in core ESP8266 Arduino was causing the square wave to fail,
not an I2S DAC problem.  Move back to the square wave and save some
PROGMEM space and make it simpler and faster.
2018-03-27 06:41:43 -07:00
Earle F. Philhower, III 66d1f37810 RTTTL parser made case-insensitive 2018-03-26 08:58:28 -07:00
Earle F. Philhower, III 582e6e70ac Add RTTTL example and use a non-square waveform
Seems like I2S DACs don't like to be presented with perfect bang-bang
square waveforms, so build a very simple model and use that to avoid
abrupt changes in values.  Sounds about as good as you're going to get
with this.

Also add a simple example showing how to play a RTTTL string.
2018-03-26 08:00:56 -07:00
Earle F. Philhower, III abeba9dd89 Limit speed SerialWAV can send samples, avoid WDT 2018-03-26 07:15:58 -07:00
Earle F. Philhower, III 1e584d141a Merge branch 'master' of https://github.com/earlephilhower/ESP8266Audio 2018-03-25 21:45:38 -07:00
Earle F. Philhower, III b5faad674d Initial RTTTL (Nokia ringtone) checkin
Seems to be some problem with square wave production, but the note
processing looks good for now.
2018-03-25 21:44:22 -07:00
h3ndrik e3a3f2b278 Report buffer fill level (#52)
Add method to get the current buffer fill level (for real-time display/etc.)
2018-03-25 12:14:08 -07:00
reaper7 32cbbfed45 Add PDM mode for ESP32 (#77)
Add PDM (pulse delta modulation) mode for ESP32 using the builtin hardware.
2018-03-25 12:11:29 -07:00
Earle F. Philhower, III 9598c4862e Add ESP32-fs-plugin link to README, thx @rfestag 2018-03-09 10:11:05 -08:00
Earle F. Philhower, III 9e708af1f2 README now contains latest SPIFFS on ESP32 2018-03-05 07:26:12 -08:00
Earle F. Philhower, III 9991fb5300 Add links to cool uses 2018-02-28 20:35:59 -08:00
Earle F. Philhower, III db411fadbf Add Mixer::loop() to allow just sending I2S data
Allow users to call the ::loop() method to pump out any possible data
to the I2S interface, without requiring any Stubs to pump the queue.
2018-02-26 13:11:23 -08:00
Earle F. Philhower, III e9aec0449d Add AudioOutputMixer to valgrind testing
It, amazingly, worked without any issues found by Valgrind on the
first try.
2018-02-26 12:56:48 -08:00
Earle F. Philhower, III 3c7ffbe0b3 Support volume on each input channel
Call stub->SetGain(float) to set an input's volume before mixing.
2018-02-25 14:24:38 -08:00
Earle F. Philhower, III ca50839712 WIP - AudioOutputMixer to combine multiple streams
This runs but amplification is not working yet.  See MixerSample
for a very crufty example.
2018-02-25 13:37:17 -08:00
Earle F. Philhower, III 11bd5d2188 Set builtindac mamber before calling SetPinout
Hans-J. Ubben found a bug where the pinout wasn't being set properly on
ESP32s because the builtInDAC member was not set before calling SetPinout.
Fix per his suggestion.
2018-02-17 15:24:29 -08:00
Earle F. Philhower, III 01d9daeb12 Fix ID3v2 decoding, avoid infinite loop
The ID3 reader was incorrectly skipping extended headers and was
cutting off the last 10 bytes of the last ID3 entry. Correct per
http://id3.org specs.

Fixes #41
2018-02-14 20:02:41 -08:00
Earle F. Philhower, III 54498a21a0 Fix overflow for 256x oversampling
Fixes #55
2018-02-08 17:39:51 -08:00
h3ndrik 0bb859037b handle esp32 apll issues (#51)
* make use_apll user-configurable (fixes #37)

* disable apll per default (fixes #47)
2018-02-06 08:06:22 -08:00
Earle F. Philhower, III eb677664f2 Add more default values to I2S output 2018-02-01 12:30:30 -08:00
h3ndrik 4d9d010e8b Fix webradio to use buffer, not raw input streams
Thanks to @h3ndrik, again.
2018-01-31 19:20:08 -08:00
h3ndrik 05a78dce2a Make stream reads orders of magnitude faster (fixes #38) (#44)
Fix by @h3ndrik 
* Use correct read for stream data on the ESP32 (fixes #38)
* Adjust types for read()
2018-01-31 19:18:35 -08:00