Sound won't switch to new device

I don’t know if this is a FMOD issue or not, but I don’t know where else to look.

Once my game starts, if I switch to headphones, or some other source, the audio continues to come out the original source until I quit and restart the game.

I am running on a Mac (Mojave).

Anyone have any info on why audio in the game doesn’t switch to a new source without a restart?

Device changes aren’t handled automatically. You should be able to use the FMOD_OUTPUT_DEVICELISTCHANGED_CALLBACK callback to detect when a new device is detected (eg. a headphone is connected) and use game code to automatically switch to that device.

It’s interesting to hear that Macs will output to the speaker and headphone separately.

Not sure I know what that means? Do I need to reinit FMOD? FMOD_Studio_System_Initialize()?

That is the only thing I do to start audio in my game.

After speaking with the dev team, it seems that FMOD should be switching to the default audio device when it’s plugged in. Let us try to run a few tests on our end and we’ll get back to you.


From our tests on a few different Mac machines, it seems that FMOD does indeed switch automatically when a new device (ie. headphones) is plugged in. This happens in both the FMOD Studio application and in an in-game setting.

Does this happen on any other Mac? Are you seeing any errors appearing in the console of the FMOD Studio application or game?

I am using bluetooth headphone (I don’t have any others) and if I start the game, audio comes out the speakers, I open up System Prefs and change the audio to my earbuds and I hear the Mac chime, but the game (FMOD) audio continues out the Speaker. If I close the restart the game, audio is fine.

This also happens for our testers.

The same is true for FMOD studio, so it’s not just my game. There are no errors in the FMOD Console.

I can now confirm that this same behaviour is happening on our machines too. Uncertain of the reason for this - it looks like whatever the Mac OS is doing to switch its default output to Bluetooth is not the same logic for any other device (headphone jack, USB interface, etc.). We’ll investigate this further and see what’s going on.

In the meantime, I’ve mentioned before that FMOD provides a callback for when a new device is detected. You can utilize this callback to offer to or automatically change to the new device when detected.

Thanks for looking into this. I am still confused as to what I need to to after getting the FMOD_OUTPUT_DEVICELISTCHANGED_CALLBACK? How do I switch to this new device? Or is this a OS X level call I need to make?

Oh sorry, my mistake, I should have mentioned.

Once you have received the device change callback, you can then use the Core API function System::setOutput to choose this new device, or System::setDriver for macOS.

If it helps you guys at all:
We are encountering this problem in an internal tool we made; nothing related to FMOD or even audio in particular. Exact same behavior. It must be something weird with how MacOS handles audio-device issues. I’d imagine lightweight audio applications like browser stuff and iTunes don’t encounter it, but anything more deep-level can?

I just put up a post and immediately after, I stumbled across this one. I can confirm that I’m having the same issue on Windows. All the other active applications auto switch to the newly selected audio device except for my game and FMOD studio.

Thank you for this, an initial investigation by our dev team found the same problem occurs on both Windows & Mac but there are differences in how to handle them that makes it a bit trickier to navigate. In the meantime, please try the device list change callback suggestion above.

I’m finding that in FMOD Studio on Mac (Big Sur, M1 CPU) when I plug headphones into the jack other apps switch audio to it but not FMOD Studio. Going into Preferences > Audio, the only output device listed is MacBook Pro Speakers.

How do I switch audio to the headphones?

Also, is there progress towards a solution to the bug mentioned in this thread?

More info and a workaround…

Having plugged in my headphones, I quit FMOD Studio and restarted it. Now it lists both MacBook Pro Speakers and External Headphones and has the headphones selected.

I am an FMOD newbie and just finding my way around. Given my experience and the fact this hasn’t been mentioned by others, I suspect this is an issue for new installations of FMOD Studio. In any case, it’s obviously not auto-detecting available devices.

Thank you for this information. It looks like you can also work around this by going into File > Preferences and changing Output Device to “No Sound” then back to “Core Audio”.

I’ve added this to a new bug report, thanks for bringing it to our attention.

1 Like