mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-10 04:31:34 -10:00
This adds support for specifying multiple sounds for a single game sound entry. The engine then selects which sound will be played based on the strategy provided by the game data. This required a few changes to some of the game code since previously every game sound had exactly one sound file attached to it. The most notable change is that it is no longer possible to determine the exact duration a sound can have so instead the new code computes the maximum duration a sound can have and uses that where appropriate. This also adds support for randomizing the pitch and volume of the sound to provide a more varied experience even if only a single sound is used. One possible issue that exists is that the "sequential" strategy only works globally at the moment so if two sources use the same game sound concurrently then the two sources will share the sequence of sounds since there is no sound instance data at the moment. That can be added in a future change but should not present a huge issue for most use-cases. Visual Studio on Appveyor somehow causes deprecation error on _our_ definition of vsprintf. I have no idea why these changes introduced this warning but I won't debug Visual Studio compiler bugs that I can't reproduce with my Visual Studio version so I just disabled those warnings.