You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This could be user error as it is showing up in a rather large and complicated codebase, but I thought I would write it up anyway in case it's useful.
it seems that loop() can get stuck for the duration of a track under high CPU load, with a LittleFS>mp3>mixer>I2S chain.
I notice that the stub calls the mixers loop() for every sample, which may have something do do with it. With that extra call, the amount of data processed per loop depends on the relative speeds of the generator and the sink, making it a bit less predictable.
I don't really see why this would be an actual problem, it seems like it should still return pretty fast on each call, but perhaps there is some subtle blocking effect in the final i2s API, even though it's supposed to be non-blocking?
Right now I'm working around it by using a modified copy of the library omitting that extra loop() call, and increasing the DMA buffer in the I2S driver, along with adding an ignoreStop option to stubs, so I can reuse them between generators to get sample perfect loops.
This could be user error as it is showing up in a rather large and complicated codebase, but I thought I would write it up anyway in case it's useful.
it seems that loop() can get stuck for the duration of a track under high CPU load, with a LittleFS>mp3>mixer>I2S chain.
I notice that the stub calls the mixers loop() for every sample, which may have something do do with it. With that extra call, the amount of data processed per loop depends on the relative speeds of the generator and the sink, making it a bit less predictable.
I don't really see why this would be an actual problem, it seems like it should still return pretty fast on each call, but perhaps there is some subtle blocking effect in the final i2s API, even though it's supposed to be non-blocking?
Right now I'm working around it by using a modified copy of the library omitting that extra loop() call, and increasing the DMA buffer in the I2S driver, along with adding an ignoreStop option to stubs, so I can reuse them between generators to get sample perfect loops.
https://github.com/EternityForest/ArduinoCogs/blob/main/src/esp8266audio_vendored/AudioOutputMixer.cpp
The text was updated successfully, but these errors were encountered: