-
A bug fix for decoded_samples
01/03/2022 at 02:26 • 0 commentsWhile recording a new video with my sync fix, I noticed a problem that I'd introduced. The decoded_samples count didn't reset to 0 when the file was replayed. This resulted in all of the word clock entries getting replayed almost immediately when the song started. It was a simple fix, and a new pull request was made.
-
Audio sync fixed!
01/02/2022 at 17:35 • 0 commentsI dug into the CircuitPython code a bit yesterday and came up with a pull request for the audiomp3 code. This adds a decoded_samples property that can be used to understand how much of the MP3 file has been played. After plugging that into the word clock code, using it instead of the elapsed monoclock time, sync was perfect for the whole song. I could even run the double scaled word clock, which looks great on the PyBadge's small screen. There's a little glitchiness during the more complex part of the song, but it's minor and doesn't make it all go sideways. I also took this opportunity to re-enable the VU meter during the wordless parts of the song, which makes it more visually interesting.
This morning, the PR was accepted, so I think this may be in the next 7.2.0 alpha 2 CircuitPython release. I'm going ahead and updating my project ZIP file with the new source.