Overview
An error regarding sample rates occurs given a specific mp3 file. I would share the file for reproduction but it's a copyrighted work.
MP3 file Properties
- filename: "retribution.mp3"
- bitrate: 199kbps
- length: 0:03:00
- size: 4.38 MB
- other info: converted from FLAC to mp3 using VLC's "convert/save" context menu and the "lame" codec.
Error message
Immediately upon upload a toast notification appears in the bottom left saying:
AudioContext.createMediaStreamSource: Connecting AudioNodes from AudioContexts with different sample-rate is currently not supported.
After clicking the toast itself the notification's text changes to:
start@https://soundshader.github.io/audio/controller.js:108:33 setMouseHandlers/btnUpload.onclick@https://soundshader.github.io/index.js:129:30
which I assume to be just an unrelated click handler debug event that's now being shown because your toast is just a catch-all for debug logging.
Best guess
My best guess as to why this happens is because my mp3 is in an unexpected format due to me converting it from FLAC using VLC. I'll reconvert with different options and report back.
Unrelated, but it's very difficult to actually copy the initial message to the clipboard due to a click on it causing it to change. I had to use screen capture and re-type it. Keeping a persistent error message would be helpful for people who wanted to file issues. Having said that, thanks for putting some debug output upon error at all. That stuff is usually in a dev console and the increased visibility makes it easier for people who are "just stopping by" to fix their own problems/file an issue.
Edit: ^ This has since been fixed
Awesome project by the way. I felt like I was hitting a wall in finding creative techniques to visualize sound with the classic fourier analysis. Don't know how this technique has evaded me for so long.