* ESP32-C3 has no ULP coprocessor
Only the ESP32, ESP32-S2 and ESP32-S3 chips have an ULP coprocessor, ESP32-C3 doesn't have it. So exclude this code from compiling, as it cannot compile in the C3 environment.
* uint32_t and size_t is not the same on RISC-V
This change is necessary to be able to compile it on ESP32-C3
* uint32_t and size_t is not the same on RISC-V
The change is necessary to compile it on ESP32-C3
* ESP32-C3: I2S_MODE_DAC_BUILT_IN / I2S_MODE_PDM not available
On some ESP32 chips (e.g. ESP32-C3), builtin DAC is not possible as it lacks the hardware module. In order to be able to compile the library on ESP32-C3 the defines cannot be used.
Without this fix, there is no sound and the serial monitor shows:
Starting up...
[E][vfs_api.cpp:22] open(): File system is not mounted
[E][vfs_api.cpp:22] open(): File system is not mounted
BEGIN...
MIDI done
MIDI done
After this fix there is sound and no error on the serial monitor.
Then change is similar to the code in https://github.com/earlephilhower/ESP8266Audio/blob/master/examples/PlayMP3FromSPIFFS/PlayMP3FromSPIFFS.ino
* replace a disappeared shoutcast url by a working one from another example
* increase a buffer size (found by valgrind)
* make emulated example closer to the not emulated one
use `./onHost diff` to show the diff -u
* add `diff` option to onHost script
* add a delay to local copy of AudioOutputNull
* increase another buffer size
* make AudioOutputNullSlow.h compatible with arduino api (not only emulation on host)
Thanks to @cjwhoishe, fixes#355 .
When a large enough read size was requested it is possible that for some
streams multiple ICY blocks could appear. The logic doesn't support
that, so only read up to 1/2 the ICY block interval to ensure there is
no way to see two ICY blocks in one readInternal call.
* esp8266: Allows I2S-NoDAC to use only I2S-out-data GPIO
avoiding conflicts with repurposed GPIO, especially conflicting with SDFS.
* +message
* new upstream API update
* check i2s_begin's return value
* Fix the order of mono samples (each pair was swapped)
* Remove comment on version and date (currently tracked within ESP8266Audio repo)
* Added some usage instructions to the header file
* Delete sample in buffer after being rendered (ULP) to avoid sound looping in the buffer at the end of playback
Co-authored-by: Martin-Laclaustra <Martin-Laclaustra@github.com>
* Modified AudioFileSourceFS.h to add resolution operator on items defined into the fs namespace in esp32 libraries.
* Added track, set, popularimeter, compilation tags.
Changed framesize loop with 32bit counter to avoid endless loops for large frames (like APIC).
Co-authored-by: Pierre-Loup Martin <lelabodutroisieme@gmail.com>
Code courtesy of Martin Laclaustra.
Uses the ULP coprocessor on the ESP32 to send samples to the onboard
DACs, freeing the I2S port for other uses.
Connect left output to pin 25, right to pin 26.
When reusing the AudioGeneratorMP3 object to play multiple files with errors, the error count was never reset.
Also, if 3 errors are encountered, it would stop running but never clean up the buffers.