Fmod version is 2.01.05
I have a very primitive API for modding purposes where users can create a
Sound object and play that via
System::playSound() This gives them all the control over sounds without having to setup any Fmod Studio project and generally users are quite happy with the interface.
However some users are experiencing strange problems:
- when they use some sounds (seems to mainly affect short sounds) they hear a crackle at the end of the sound
- sometimes vanilla game audio cuts out as if all its channels are stolen, that happens event when just one modded sound is playing
- eventually all game sound will die from this and never recover, while the Fmod API never returns any error codes
While investigating the issue it seems to me that issue 1 plays a role in triggering issue 3, however issue 2 always happens to some degree. I also can’t share the files that users experience this with since they are using audio files from Minecraft and I don’t want to share copyrighted material.
Some more technical details:
- The sounds are all created from raw PCM that is loaded in by a third-party library from various file formats.
- I inspected the waveforms after load and they don’t seem to have any wrong data.
- The worst offenders are all <1s long audio files (Minecraft mining sounds).
- I have two master channel groups, sfx and music, that users play their sounds on.
- The channels are not playing infinitely for some reason, they all successfully return
- All the features are of course hidden behind an API, so there likely is no user error. The API is used roughly like this
sound = create_sound("path_to_my_sound.wav") playing_instance = sound:play()
What could I be doing wrong here? Or are there any settings that I should try in order to improve the situation?