I have wired a headphone amplifier to pin A4 and copied the last example from this page: http://www.espruino.com/Waveform
to stream a waveform from the SD card.
For some strange reason, the playback sampling rate does not remain constant. It seems that every time a new buffer is used, the sampling rate changes to a random value roughly in the range +/- 100%, so a recorded voice alternates between normal, Mickey Mouse and monster a few times per second.
What could be causing this? I am using the example code (only changed filenames). It doesn't matter if I try to play with 8, 11, 16 or 22 kHz, I always get this strange behavior.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I have wired a headphone amplifier to pin A4 and copied the last example from this page:
http://www.espruino.com/Waveform
to stream a waveform from the SD card.
For some strange reason, the playback sampling rate does not remain constant. It seems that every time a new buffer is used, the sampling rate changes to a random value roughly in the range +/- 100%, so a recorded voice alternates between normal, Mickey Mouse and monster a few times per second.
What could be causing this? I am using the example code (only changed filenames). It doesn't matter if I try to play with 8, 11, 16 or 22 kHz, I always get this strange behavior.