Skip to content

Directional audio issue in games #2

Description

@RondoRevolution

I've found this repo and the reddit post a week ago and have been using this config happily for music and YouTube, but recently I decided to game with it, and noticed that whenever I have the Virtual Surround sink selected, some sounds have issues in the two games I tried that are not present when I open it with the Headphone Correction Sink.

More precisely, in Gunfire Reborn character sounds only come from the left channel/ear, it also happens with the initial gun. The only exception is the character Tao, where her character sounds come from both left and right, but duplicated. Skills and other guns sounds seems to be coming correctly.

In Risk of Rain 2 something similar happens. In the character select screen, a lot of characters sound like coming from the left. Without the Virtual Surround sink selected, they sound slightly to the right since the characters are off-center in the screen (tho there are characters where their select sound is centered). But in-game, pod arrival sound, gun sounds, character sounds and skills are all coming only from the left channel/ear.

Here are my config files:

99-eq.conf
  context.modules = [
{   name = libpipewire-module-parametric-equalizer
    flags = [ nofail ]
    args = {
        node.description = "Headphone Correction Sink"
        media.name       = "Headphone Correction Sink"
        equalizer.filepath = "/home/jojo/.local/share/pipewire/eq/kz-crn.txt"
        audio.channels = 2
        audio.position = [ FL FR ]
            capture.props = {
                node.name   = "effect_input.eq6"
                media.class = Audio/Sink
            }
            playback.props = {
                node.name   = "effect_output.eq6"
                node.passive = true
                target.object = alsa_output.pci-0000_0c_00.4.analog-stereo
            }
        }
    }
]
99-virtual-surround.conf
# Headphone surround sink
#
# Copy this file into a conf.d/ directory such as
# ~/.config/pipewire/filter-chain.conf.d/
#
# Adjust the paths to the sofa file to match your system.
#
context.modules = [
    { name = libpipewire-module-filter-chain
        flags = [ nofail ]
        args = {
            node.description = "Virtual Surround"
            media.name       = "Virtual Surround"
            filter.graph = {
                nodes = [
                    {
                        type = sofa
                        label = spatializer
                        name = spFL
                        config = {
                            filename = "/home/jojo/.local/share/pipewire/hrir/EAC_48kHz.sofa"
                        }
                        control = {
                            "Azimuth"    = 30.0
                            "Elevation"  = 0.0
                            "Radius"     = 75.0
                        }
                    }
                    {
                        type = sofa
                        label = spatializer
                        name = spFR
                        config = {
                            filename = "/home/jojo/.local/share/pipewire/hrir/EAC_48kHz.sofa"
                        }
                        control = {
                            "Azimuth"    = 330.0
                            "Elevation"  = 0.0
                            "Radius"     = 75.0
                        }
                    }
                    {
                        type = sofa
                        label = spatializer
                        name = spFC
                        config = {
                            filename = "/home/jojo/.local/share/pipewire/hrir/EAC_48kHz.sofa"
                        }
                        control = {
                            "Azimuth"    = 0.0
                            "Elevation"  = 0.0
                            "Radius"     = 75.0
                        }
                    }
                    {
                        type = sofa
                        label = spatializer
                        name = spRL
                        config = {
                            filename = "/home/jojo/.local/share/pipewire/hrir/EAC_48kHz.sofa"
                        }
                        control = {
                            "Azimuth"    = 150.0
                            "Elevation"  = 0.0
                            "Radius"     = 75.0
                        }
                    }
                    {
                        type = sofa
                        label = spatializer
                        name = spRR
                        config = {
                            filename = "/home/jojo/.local/share/pipewire/hrir/EAC_48kHz.sofa"
                        }
                        control = {
                            "Azimuth"    = 210.0
                            "Elevation"  = 0.0
                            "Radius"     = 75.0
                        }
                    }
                    {
                        type = sofa
                        label = spatializer
                        name = spSL
                        config = {
                            filename = "/home/jojo/.local/share/pipewire/hrir/EAC_48kHz.sofa"
                        }
                        control = {
                            "Azimuth"    = 90.0
                            "Elevation"  = 0.0
                            "Radius"     = 75.0
                        }
                    }
                    {
                        type = sofa
                        label = spatializer
                        name = spSR
                        config = {
                            filename = "/home/jojo/.local/share/pipewire/hrir/EAC_48kHz.sofa"
                        }
                        control = {
                            "Azimuth"    = 270.0
                            "Elevation"  = 0.0
                            "Radius"     = 75.0
                        }
                    }
                    {
                        type = sofa
                        label = spatializer
                        name = spLFE
                        config = {
                            filename = "/home/jojo/.local/share/pipewire/hrir/EAC_48kHz.sofa"
                        }
                        control = {
                            "Azimuth"    = 180.0
                            "Elevation"  = 0.0
                            "Radius"     = 75.0
                        }
                    }
                    {
                        type = sofa
                        label = spatializer
                        name = spTFL
                        config = {
                            filename = "/home/jojo/.local/share/pipewire/hrir/EAC_48kHz.sofa"
                        }
                        control = {
                            "Azimuth"   = 30.0
                            "Elevation" = 75.0
                            "Radius"    = 75.0
                        }
                    }
                    {
                        type = sofa
                        label = spatializer
                        name = spTFR
                        config = {
                            filename = "/home/jojo/.local/share/pipewire/hrir/EAC_48kHz.sofa"
                        }
                        control = {
                            "Azimuth"   = 330.0
                            "Elevation" = 75.0
                            "Radius"    = 75.0
                        }
                    }
                    {
                        type = sofa
                        label = spatializer
                        name = spTRL
                        config = {
                            filename = "/home/jojo/.local/share/pipewire/hrir/EAC_48kHz.sofa"
                        }
                        control = {
                            "Azimuth"   = 150.0
                            "Elevation" = 75.0
                            "Radius"    = 75.0
                        }
                    }
                    {
                        type = sofa
                        label = spatializer
                        config = {
                            filename = "/home/jojo/.local/share/pipewire/hrir/EAC_48kHz.sofa"
                        }
                        name = spTRR
                        control= {
                            "Azimuth"   = 210.0
                            "Elevation" = 75.0
                            "Radius"    = 75.0
                        }
                    }
                    { type = builtin label = mixer name = mixTL }
                    { type = builtin label = mixer name = mixTR }
                    { type = builtin label = mixer name = mixBL }
                    { type = builtin label = mixer name = mixBR }
                    { type = builtin label = mixer name = mixL }
                    { type = builtin label = mixer name = mixR }
                ]
                links = [
                    { output = "spFL:Out L"  input="mixBL:In 1"  }
                    { output = "spFL:Out R"  input="mixBR:In 1"  }
                    { output = "spFR:Out L"  input="mixBL:In 2"  }
                    { output = "spFR:Out R"  input="mixBR:In 2"  }
                    { output = "spFC:Out L"  input="mixBL:In 3"  }
                    { output = "spFC:Out R"  input="mixBR:In 3"  }
                    { output = "spRL:Out L"  input="mixBL:In 4"  }
                    { output = "spRL:Out R"  input="mixBR:In 4"  }
                    { output = "spRR:Out L"  input="mixBL:In 5"  }
                    { output = "spRR:Out R"  input="mixBR:In 5"  }
                    { output = "spSL:Out L"  input="mixBL:In 6"  }
                    { output = "spSL:Out R"  input="mixBR:In 6"  }
                    { output = "spSR:Out L"  input="mixBL:In 7"  }
                    { output = "spSR:Out R"  input="mixBR:In 7"  }
                    { output = "spLFE:Out L" input="mixBL:In 8"  }
                    { output = "spLFE:Out R" input="mixBR:In 8"  }
                    { output = "spTFL:Out L" input = "mixTL:In 1" }
                    { output = "spTFL:Out R" input = "mixTR:In 1" }
                    { output = "spTFR:Out L" input = "mixTL:In 2" }
                    { output = "spTFR:Out R" input = "mixTR:In 2" }
                    { output = "spTRL:Out L" input = "mixTL:In 3" }
                    { output = "spTRL:Out R" input = "mixTR:In 3" }
                    { output = "spTRR:Out L" input = "mixTL:In 4" }
                    { output = "spTRR:Out R" input = "mixTR:In 4" }
                    { output = "mixBL:Out" input = "mixL:In 1" }
                    { output = "mixTL:Out" input = "mixL:In 2" }
                    { output = "mixBR:Out" input = "mixR:In 1" }
                    { output = "mixTR:Out" input = "mixR:In 2" }

                ]
                inputs  = [ "spFL:In" "spFR:In" "spFC:In" "spLFE:In" "spRL:In" "spRR:In" "spSL:In" "spSR:In" "spTFL:In" "spTFR:In" "spTRL:In" "spTRR:In"  ]
                outputs = [ "mixL:Out" "mixR:Out" ]
            }
            capture.props = {
                node.name      = "effect_input.spatializer"
                media.class    = Audio/Sink
                audio.channels = 12
                audio.position = [ FL FR FC LFE RL RR SL SR TFL TFR TRL TRR ]
            }
            playback.props = {
                node.name      = "effect_output.spatializer"
                node.passive   = true
                audio.channels = 2
                audio.position = [ FL FR ]
                target.object  = effect_input.eq6
            }
        }
    }
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions