Add support for new audio devices after BeamNG has already started

Discussion in 'Ideas and Suggestions' started by <-=[S.d.V]=-> Duck, Oct 20, 2022.

  1. <-=[S.d.V]=-> Duck

    <-=[S.d.V]=-> Duck
    Expand Collapse

    Joined:
    Jul 11, 2017
    Messages:
    14
    I have found this reply from 4 years ago stating why we can't have BeamNG detect new audio sources without restarting.

    I think it's a good time to revisit this issue, 4 years later, and ask the question: Can we have some way of BeamNG detecting new audio sources without having to restart it?

    My use case: I use a bluetooth headset (that is becoming more and more common), and sometimes when I boot my PC and start playing, I realize that I have to connect my Bluetooth headset, which might not be paired automatically on boot for a number of reasons (it automatically connected to my phone/tablet, etc?).

    In that scenario, the only way to have BeamNG outputting Audio to my bluetooth headset is to close it and open it again. This is frustrating, especially on Multiplayer, where we might have a race or a pursuit going on. I have tried setting the default audio source to my headset on Windows, and also overriding BeamNG to output audio to my bluetooth headset using Windows audio mixer. There's something in the way that BeamNG handles new audio sources that prevents any kind of fix other than closing and opening it again.
     
    • Agree Agree x 3
  2. Ron Drives

    Ron Drives
    Expand Collapse

    Joined:
    Oct 12, 2022
    Messages:
    12
    I recently raised this issue in a bug report thread mixed with other issues. This is the response I was given about switching audio devices:


    My own perception is they still have a very big to-do list and this specific issue would be very low priority, if it is even on a "future" list somewhere at all. I agree with you and would love to see this fixed, but I don't think we can count on it getting addressed any time soon.
     
  3. <-=[S.d.V]=-> Duck

    <-=[S.d.V]=-> Duck
    Expand Collapse

    Joined:
    Jul 11, 2017
    Messages:
    14
    Actually, the issue isn't only on new audio sources. BeamNG sticks with the audio output that was the default Windows one at the time it started, and don't change when we change the Windows default device at OS level anymore. There's some hardcoded logic in BeamNG's "startup logic" that happens only once, where it defines the audio output, using the one that was the default windows audio device at that time, where the only solution to change audio source is to restart the game.

    This logic should also run at runtime when Windows changes the default device at runtime, essentially following the audio output that is defined at OS, not only at startup, but whenever it changes.

    --- Post updated ---


    I've seen in this Wiki that BeamNG uses FMOD. There's a forum thread in FMOD asking for this feature, and an interesting response:

    We added this feature in version 2.01.00, if you initialize FMOD using the default device, then change the default device at runtime (in Windows) FMOD will switch with it.


    Relevant changelog entry of release 2.01.00: Core API - Win - FMOD_OUTPUT_DEVICELISTCHANGED_CALLBACK now responds to default device changes.

    Is BeamNG using FMOD 2.01.00 or higher? If not, is it possible to update FMOD? Latest version is 2.02.09

    Relevant links:
    - https://qa.fmod.com/t/fmod-does-not-auto-switch-to-the-default-playback-device/15884/3
    - https://qa.fmod.com/t/switching-audio-output-device-esp-for-vr/15386/3
    - https://learn.microsoft.com/en-us/windows/win32/api/mmdeviceapi/nn-mmdeviceapi-immnotificationclient
    - https://qa.fmod.com/t/sound-wont-switch-to-new-device/15621
     
    #3 <-=[S.d.V]=-> Duck, Oct 22, 2022
    Last edited: Oct 22, 2022
    • Like Like x 1
  4. <-=[S.d.V]=-> Duck

    <-=[S.d.V]=-> Duck
    Expand Collapse

    Joined:
    Jul 11, 2017
    Messages:
    14
    Can someone from BeamNG confirm or dismiss whether it would be possible to update FMOD to potentially solve this issue?
     
    • Agree Agree x 2
  5. bussin.buses

    bussin.buses
    Expand Collapse

    Joined:
    Aug 1, 2022
    Messages:
    4,386
    Someone that knows about this answer! Lol
     
  6. TDK

    TDK
    Expand Collapse
    FLIT KILLS MOTHS
    BeamNG Team

    Joined:
    Dec 17, 2017
    Messages:
    600
    It's not an FMOD issue. It's a very old legacy issue in our code written years ago before FMOD was inserted in to the game.
     
  7. PowerstrokeHD

    PowerstrokeHD
    Expand Collapse

    Joined:
    Feb 5, 2021
    Messages:
    2,598
    A trick that works for me is disabling all other audio devices. Minecraft used to have the same issue.
     
    • Like Like x 1
    • Agree Agree x 1
  8. <-=[S.d.V]=-> Duck

    <-=[S.d.V]=-> Duck
    Expand Collapse

    Joined:
    Jul 11, 2017
    Messages:
    14
  9. Sperbal

    Sperbal
    Expand Collapse

    Joined:
    Nov 1, 2022
    Messages:
    1
    Literally just made an account to let you know of a solution of sorts. I often switch my Windows default audio output device from my speakers to my headphones and I realised that if I wanted to change the device with a game open I couldn't. I had to restart.

    So I did a little digging around and there is a simple little tool you can download here.

    Launch this when your game is open and simply route the application audio to any device you want. It works for any game that has the same issue.

    Just tried it to confirm before posting and it does indeed work.

    Try it for yourself. Hope it helped.
     
    • Like Like x 3
  10. TDK

    TDK
    Expand Collapse
    FLIT KILLS MOTHS
    BeamNG Team

    Joined:
    Dec 17, 2017
    Messages:
    600
    Cool - thank you!
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice