Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question possible to change "AudioManager - Default Speaker Mode" as end user? (published game)

Discussion in 'Audio & Video' started by Lim3r, Jan 26, 2023.

  1. Lim3r

    Lim3r

    Joined:
    Jan 25, 2023
    Posts:
    2
    Hello,

    I'd like to enable/force surround sound in Valheim but it has no internal setup option to change the AudioSpeakerMode from it's compile-time default "2=Stereo" into anything else.

    Is there any way to configure it externally / override the internal default?
    Sth. like:
    • an environment variable
    • registry entry (Valheim stores plenty of settings @
      HKCU\Software\IronGate\Valheim
      )
    • an undocumented command line argument
    • en entry in boot.config
    • hex-editing some Valheim binary/exe/dll
    • in-memory hacking
    The developers don't seem to care about the apparently shrinking number of gamers with surround sound setups and are ignoring the problem (several posts on reddit, steam) so I followed a modding guide to try to fix it myself but I'm stuck with some errors.
    But I could verify that
    Default Speaker Mode
    is set to 2 in
    AudioManager.asset
     
    Last edited: Jan 26, 2023
  2. Lim3r

    Lim3r

    Joined:
    Jan 25, 2023
    Posts:
    2
    Found a way to directly edit
    <pathTo>\Valheim\valheim_Data\globalgamemanagers
    with UABEA and just change the speaker mode to 4/5/6/8 that way.

    Distilled down it's just half a byte change any hex editor can do:
    sfk.exe replace "<pathTo>\Valheim\valheim_Data\globalgamemanagers" -binary /0000803F020000000000000000040000/0000803F040000000000000000040000/

    Obviously that Swiss File Knife command just replaces a
    02
    with a
    04
    (you need to add a
    -yes
    to actually do the modification).

    I only verified this patch to work with Valheim version 0.212.9 and unfortunately there doesn't seem to be a reliable marker anywhere around the 2 in the binary data. -> the patch command above may not work for other versions!

    The attached archive contains all four different version (can't foresee any legal trouble from that because the file doesn't seem to contain any copyrightable data IMHO).
     

    Attached Files: