Mod lacks automatic detection of device changes
Owehttamy opened this issue · 3 comments
Bug description
When in-game, the mod (at least the Fabric version) doesn't detect any changes to the player's output environment unless it's manually changed by the player in the voice chat menu. For example, I only have one 'valid' set of speakers on my device: Bluetooth headphones. If they die or disconnect, the mod doesn't recognize that change.
Steps to reproduce the issue
*This issue has slightly different behavior given different circumstances, so I will list the steps to produce each instance.
Setting up the environment
- For ease of reproducing the issue, go to your settings (in this instance, I'm using Windows)
- Search for "Sound settings."
- Scroll down to "All sound devices."
- Disable all input and output devices except one, preferably ones that are easy to connect/disconnect from your computer quickly.
Connected -> Disconnected
- Ensure your microphone/speaker is connected in the main menu.
- Join a world or server.
- Disconnect your microphone/speakers while in-game, leaving no other device to input/output.
- The mod doesn't mute or deafen you as it still thinks you have your device connected, but not in the microphone/speaker selection menus.
Disconnected -> Connected (Speakers)
- Disconnect your one set of speakers while in the main menu.
- Join a world or server.
- Connect your speakers while in-game.
- Go to the voice chat settings to select your speakers as the output device.
- The mod claims they're already connected in the "select speaker menu," preventing you from at least forcing the mod to check again.
Disconnected -> Connected (Microphone)
- Disconnect your microphone while in the main menu.
- Join a world or server.
- Notice that the voice chat mod doesn't state that you're—by a technicality—muted, as you have no microphone to talk with.
- Connect your microphone while in-game.
- Attempt to talk, and notice it doesn't output anything.
This also doesn't work for push-to-talk, muting then unmuting, enabling microphone testing, or switching between push-to-talk and voice activation. Essentially, it doesn't work in any instance.
- Go to the voice chat settings to attempt to select your microphone as the input device.
- The mod claims they're already connected in the "select microphone menu," preventing you from at least forcing the mod to check again.
Currently, the only way to fix these issues is by relogging, which—in my opinion—is inconvenient.
Expected behavior
The mod detects when the current audio devices are no longer present to reflect the proper, up-to-date detection of the device selection screens.
If there's no reasonable way to do that, then at least provide the ability to 'reselect' the audio device you're already using when there's only one available option to avoid periodic checks.
Given that the device selection menus are the outlier here, it can be assumed that they're only claiming they are selecting the device because the menu probably needs to state that something is chosen if devices are available. Another easy way to allow players to fix this manually (without relogging) is by giving the menu the option not to select anything automatically.
Versions
Other mods
Not rooted in a compatibility issue; it still occurs in an environment with only Fabric API and Simple Voice Chat.
Footnotes
The mod supports multiple audio backends. There is no way with these libraries to detect if devices connect or disconnect. It is completely intended behavior of the mod to not detect changing audio devices. It is not supported/recommended changing your audio setup while the game is running. We are limited by the libraries, Minecraft itself ships.
Gotcha.
Is it still possible to allow players to at least re-select their audio device manually in the voice chat settings then? Because currently, if the menu says it's selected (even if it's not or wonked up because of its inability to detect changes), you can't manually force it to reconfigure.
Yes, you shouldn't be fiddling with your audio setup while the game is running, but providing a solution other than relogging would be nice.