kira
kira copied to clipboard
`StaticSoundData` is a performance footgun in debug mode
Using StaticSoundData when symphonia is built with opt-level = 0 can cause long audio processing times of up to twelve seconds. In an application that plays sound effects rapidly (such as a game that makes a sound every time you shoot or move), this is enough to fill the command queue. Ideally, until symphonia can be optimized, this limitation should be documented somewhere.
Are you having long processing times when loading the StaticSoundData or every time you play it?
It only seems to happen when loading the StaticSoundData (both from a Cursor<_> and from a file).
I am seeing the same issue: very long delay for reasonably sized .mp3 files
The following Cargo.toml override is what worked for me:
[profile.dev.package.symphonia-bundle-mp3]
opt-level = 3
I added an installation section to the book with information on setting the optimization level for dependencies.