mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-01 22:30:42 -07:00
audio: create a wrapper for asio drivers (#731)
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
Create `WrappedAsio`, similar to how we wrap `IAudioEndpoint`
So far, the wrapper does these things:
1. logging (for diagnosis, since iidx and gfdm don't produce any logs
when asio succeeds)
2. iidx32+ hack to work around refcount mismatch issue
3. sdvx valk cab hack to force 2-channel audio ("downmixing" by taking
only the front channels)
4. honor volume boost
As a result of `#2` the mempatch was removed from `iidx.cpp` since we
can tackle it cleanly in the hook. `#3` also removes the need for manual
patches.
Real downmixing is hard & expensive on the CPU so it was not
implemented.
## Testing
Tested iidx/sdvx/gfdm with xonar and flexasio
This commit is contained in:
@@ -948,6 +948,15 @@ static const std::vector<OptionDefinition> OPTION_DEFINITIONS = {
|
||||
.category = "Game Options",
|
||||
.picker = OptionPickerType::AsioDriver,
|
||||
},
|
||||
{
|
||||
// SDVXAsioTwoChannel
|
||||
.title = "SDVX ASIO Two Channel Audio",
|
||||
.name = "sdvxasio2ch",
|
||||
.desc = "Force the game to use two channels for ASIO output.",
|
||||
.type = OptionType::Bool,
|
||||
.game_name = "Sound Voltex",
|
||||
.category = "Game Options",
|
||||
},
|
||||
{
|
||||
// spice2x_SDVXSubPos
|
||||
.title = "SDVX Subscreen Overlay Position",
|
||||
@@ -1965,7 +1974,7 @@ static const std::vector<OptionDefinition> OPTION_DEFINITIONS = {
|
||||
},
|
||||
{
|
||||
// VolumeBoost
|
||||
.title = "WASAPI Boost Audio Volume",
|
||||
.title = "WASAPI/ASIO 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 "
|
||||
|
||||
Reference in New Issue
Block a user