mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-01 22:30:42 -07:00
audio: stereo downmix, volume boost options (#722)
## Link to GitHub Issue or related Pull Request, if one exists Fixes #717, fixes #647 ## Description of change Adds an option to downmix surround sound (5.1, 7.1, etc) down to stereo (2 speakers). This can be used in most WASAPI games, including Gitadora and FTT. How it works: when the game tries to open surround format (say, 7.1) we create a fake buffer and tell the game that it is supported. In reality we open a 2-channel stream with the real sound card. When the stream begins, we downmix the channels down to two (using one of many algorithms) and output to the sound card. While we're here, implement an option to boost the game volume by some decibel value, which is a feature often requested by SDVX players. This was needed since downmixing can sometimes result in quieter audio. ## Testing Tested GW Delta and FTT. Downmix doesn't work on IIDX (32 bits) but volume boost works.
This commit is contained in:
@@ -1075,10 +1075,12 @@ static const std::vector<OptionDefinition> OPTION_DEFINITIONS = {
|
||||
.category = "Game Options (Advanced)",
|
||||
},
|
||||
{
|
||||
.title = "GitaDora Two Channel Audio (DX/SD only)",
|
||||
.title = "GitaDora Two Channel Audio",
|
||||
.name = "2ch",
|
||||
.desc = "Attempt to reduce audio channels down to just two channels. "
|
||||
"This option does nothing for Arena Model (GW Delta and above); need a patch for that.",
|
||||
.desc = "Attempt to reduce audio channels down to just two channels.\n\n"
|
||||
"Arena Model: downmixes 7.1 to stereo using the AC-4 stereo downmix coefficients "
|
||||
"(ETSI TS 103 190-1). The WASAPI Stereo Downmix option, if set, overrides this "
|
||||
"algorithm.",
|
||||
.type = OptionType::Bool,
|
||||
.game_name = "GitaDora",
|
||||
.category = "Game Options",
|
||||
@@ -1939,6 +1941,49 @@ static const std::vector<OptionDefinition> OPTION_DEFINITIONS = {
|
||||
.hidden = true,
|
||||
.category = "Audio (Hacks)",
|
||||
},
|
||||
{
|
||||
// DownmixAudioToStereo
|
||||
.title = "WASAPI Stereo Downmix",
|
||||
.name = "downmix",
|
||||
.desc = "Downmixes multi-channel (surround) audio output to stereo.\n\n"
|
||||
"Note that in all of the options, subwoofer (LFE) is dropped.\n\n"
|
||||
"ac4 (recommended): AC-4 algorithm (ETSI TS 103 190-1) - front left/right pass "
|
||||
"through, center and surrounds fold in at -3 dB.\n\n"
|
||||
"normalize: all channels equally loud.\n\n"
|
||||
"front: Front channels only.\n\n"
|
||||
"rear: Rear channels only.\n\n"
|
||||
"side: Side channels only.",
|
||||
.type = OptionType::Enum,
|
||||
.category = "Audio",
|
||||
.elements = {
|
||||
{"ac4", "AC-4 (ETSI TS 103 190-1)"},
|
||||
{"normalize", "Normalize (drop LFE)"},
|
||||
{"front", "Front channels only"},
|
||||
{"rear", "Rear channels only"},
|
||||
{"side", "Side channels only"},
|
||||
},
|
||||
},
|
||||
{
|
||||
// VolumeBoost
|
||||
.title = "WASAPI Boost Audio Volume",
|
||||
.name = "volumeboost",
|
||||
.desc = "Artificially amplifies the hooked audio output by the selected amount, applied "
|
||||
"right before the audio reaches the device. Works regardless of channel layout or "
|
||||
"downmixing.\n\n"
|
||||
"Louder settings may cause clipping/distortion, use caution.",
|
||||
.type = OptionType::Enum,
|
||||
.category = "Audio",
|
||||
.elements = {
|
||||
{"3", "+3 dB"},
|
||||
{"6", "+6 dB"},
|
||||
{"9", "+9 dB"},
|
||||
{"12", "+12 dB"},
|
||||
{"15", "+15 dB"},
|
||||
{"20", "+20 dB"},
|
||||
{"25", "+25 dB"},
|
||||
{"30", "+30 dB"},
|
||||
},
|
||||
},
|
||||
{
|
||||
// DelayBy5Seconds
|
||||
.title = "Delay by 5 Seconds (DEPRECATED - use -sleepduration instead)",
|
||||
|
||||
Reference in New Issue
Block a user