Updated code to correctly call the parent classes constructor for the RP2040.
Changed the code for the RP2040 to correctly call the parent classes constructor.
* Fix a tricky bug that causes delays in playback
... this bug was already present in stellaplayer. Obviously "effectNumber" must be checked, because "effectParameterX" just holds the "upper nibble" of effectParameter
* fix for issue #474
- do channel mixing in 32bit, to avoid noise from over/underflow
- write audio output as "signed int" (not unsigned)
- add int16 saturation check ("clipping")
* avoid crash when MOD file has to many CHANNELS
- avoid guru meditation, by logging an error and refusing playback in case MOD.numberOfChannels > CHANNELS
- correct small typo
* internal DAC: avoid possible overflow in conversion int16 -> uint16
* update constants
.. we can do 16bit and 8 channels, so let's do it ;-)
This adds some debugging code to better understand what is going on inside the mixer code (AudioGeneratorMOD::GetSample). And it also prints out some usefull information from the MOD file.
Only active when do_MIXER_DEBUG is defined.
* MOD generator: 12 bits of "real" resolution (instead of 10)
With this change, we gain 2 additional bits of "real resolution" from the sample interpolation step.
Still need some testing to be sure that nothing get "lost" at the same time.
* limit to 4 channels on ESP8266
As discussed in https://github.com/earlephilhower/ESP8266Audio/pull/479#issuecomment-1007708703
Fixes#474
This bug was already present in stellaplayer. Obviously "effectNumber" must be checked, because "effectParameterX" just holds the "upper nibble" of effectParameter
- do channel mixing in 32bit, to avoid noise from over/underflow
- write audio output as "signed int" (not unsigned)
- add int16 saturation check ("clipping")
* avoid crash when MOD file has to many CHANNELS
- avoid guru meditation, by logging an error and refusing playback in case MOD.numberOfChannels > CHANNELS
* Update AudioOutputI2S.cpp
* Update AudioOutputSPDIF.cpp
* Fix PDM & DAC mode ESP32
The code for enabling compatibility with ESP32C3 had broken DAC builtin and PDM mode on ESP32. This should fix it again
* Update AudioOutputI2S.cpp
* 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)