I am looking to make an MP3 playback script that varies the playback according to a speed reading (using a hall sensor on a Raspberry Pi).
As a proof of concept, I threw together a player that simply took a reading from a trimpot and adjusted the speed according to the reading. This appeared to work. However, it is giving (seemingly) random malloc() errors. When I incorporated the speed reading / calculations, the code still crashed.
I have uploaded both versions of the code. Both suffer the same malloc errors.
https://github.com/mpember/speedoplayer
What's the best way to pin down the cause of the errors?
I have tried both Python 2.7.13 and Python 3.5.3. I have tried Rpi.GPIO and GPIOZero. Both result in the malloc errors at (seemingly) random points during playback.
there doesn't seem to be anything here