Difference between revisions of "Enhanced sound"
m (+category) |
(→Tips on selecting priorities/limits) |
||
Line 66: | Line 66: | ||
[''FSO already takes volume into account when deciding whether to replace a currently playing sound.''] | [''FSO already takes volume into account when deciding whether to replace a currently playing sound.''] | ||
− | "b) Priority - a value you set yourself based on the importance of the sound and the likely hood that the user will notice the sound dropping out. Background music, for example, should be set to never be dropped. A random cricket sound for ambience should | + | "b) Priority - a value you set yourself based on the importance of the sound and the likely hood that the user will notice the sound dropping out. Background music, for example, should be set to never be dropped. A random cricket sound for ambience should have low priority. |
"c) Grouping [or ''limit''] - If you have gunshot sounds for example, once they have hit a hard limit (say 15) you would stop adding new gunshot sounds as they wouldn't add to the overall mix. | "c) Grouping [or ''limit''] - If you have gunshot sounds for example, once they have hit a hard limit (say 15) you would stop adding new gunshot sounds as they wouldn't add to the overall mix. |
Revision as of 10:16, 2 August 2022
Enhanced sound was merged into master on June 1, 2015, as of Git commit d7f54dd.
Enhanced sound adds
- Support for 128 audio channels instead of 32
- Support for more control over how the game prioritizes sounds in a mission
Enhanced sound is enabled by default, but it's disabled if you are not using OpenAL Soft. See How to get OpenAL Soft below.
You can also manually disable enhanced sound with the "Disable enhanced sound" launcher flag under the "Audio" flags.
Contents
How to get OpenAL Soft
Windows
- First, you need to get the OpenAL32.dll file. You can download version 1.16.0 here.
- Alternatively, to get OpenAL32.dll from its original source:
- Download from the OpenAL Soft site the file whose name ends with "-bin.zip", such as openal-soft-1.16.0-bin.zip.
- Open the .zip file and rename soft_oal.dll found in the bin\Win32\ folder to OpenAL32.dll.
- Once you have OpenAL32.dll:
- Copy it to your FreeSpace 2 or TC folder.
- Make sure to put a copy of OpenAL32.dll in both your FreeSpace 2 folder and the root folders of any TCs you have.
Linux
Linux uses OpenAL Soft, so you don't need to do anything.
However, you may wish to build from source either the most recent stable release from the OpenAL Soft site or even the latest commit from their Git repository.
OS X
See this thread for OS X builds that use OpenAL Soft.
For modders
Overview
Enhanced sound provides control through two values that you can set through extensions of sounds.tbl:
- Priority: how important the sound is
- Limit: how many instances of the sound can be playing at hte same time
The engine has hardcoded default priorities and limits, as described below.
You can set custom values for priorities limits using a .tbm file extending sounds.tbl. The Sounds.tbl page has details on how to specify custom priorities and limits.
More on default prioritiies/limits
The FSO engine has hardcoded default priorities limits for the 192 gameplay sound entries in the FS2 retail sounds.tbl. You can see the current list in the source code's code\gamesnd\gamesnd.cpp file. Look for the line starting with
static EnhancedSoundData Default_sound_priorities[NUM_RETAIL_GAMEPLAY_SOUNDS] =
Sounds outside this range are assigned a generic default priority of Medium-High and limit 1.
Tips on selecting priorities/limits
The first answer in this thread has some details:
"The methods to prioritise [sounds] can include :
"a) Volume - the lowest being the least important. [FSO already takes volume into account when deciding whether to replace a currently playing sound.]
"b) Priority - a value you set yourself based on the importance of the sound and the likely hood that the user will notice the sound dropping out. Background music, for example, should be set to never be dropped. A random cricket sound for ambience should have low priority.
"c) Grouping [or limit] - If you have gunshot sounds for example, once they have hit a hard limit (say 15) you would stop adding new gunshot sounds as they wouldn't add to the overall mix. [Grouping/limits is also needed to prevent clipping, which is why in FSO, the warp-in sound has a low limit of 2. The super-loud warp-ins were occurring because this limit wasn't being enforced, meaning there was no limit at all.]"