Yellow-Dog-Man / Resonite-Issues

Issue repository for Resonite.
https://resonite.com
111 stars 0 forks source link

Bluetooth headset mode causes other users to be inaudible #992

Open gentlecolts opened 5 months ago

gentlecolts commented 5 months ago

Describe the bug?

When using a bluetooth device in headset mode for audio (input and output), other users are inaudible. Non-voice audio continues to play correctly, all audio settings set to 100%.

To Reproduce

Use headset in headset mode, as both input and output. This was A/B tested, same headset, same laptop, in high-fidelity (ldac) the game audio behaves as expected, but in headset mode (mSBC) the above behavior is observed.

It is worth mentioning that I observed this in a Manjaro, KDE, pipewire environment running the game via Proton, have not tested other platforms or configurations at this time

Expected behavior

Audio should play correctly regardless of output device

Screenshots

No response

Resonite Version Number

Beta 2023.12.21.1127

What Platforms does this occur on?

Linux

What headset if any do you use?

Initially observed in desktop mode

Log Files

RAICHU - 2023.12.21.1127 - 2023-12-24 00_47_25.log RAICHU - 2023.12.21.1127 - 2023-12-24 00_53_51.log RAICHU - 2023.12.21.1127 - 2023-12-24 01_02_07.log RAICHU - 2023.12.21.1127 - 2023-12-24 01_06_07.log

Additional Context

No response

Reporters

zangooseoo

ohzee00 commented 5 months ago

~I was actually just debugging the same problem with a friend the other day, have you tried unplugging the receiver (if it's a dongle based bluetooth headset) into another port?~

~Originally before we fixed it I noticed the bluetooth headset being connected at all messed with other audio outputs, making non-global audio inaudible even when switched to another output. Restarting Resonite after removing the device however "fixed" it, but the actual fix was weirdly putting the device on another port (??? No idea how that makes sense).~

~A oddity we witnessed was when the bluetooth headset was unplugged during the game, spatialized sound suddenly came back but it was all global no matter the volume. (They heard some sounds on my avatar that were playing but the output was completely 0) Do you have similar findings if you were to disconnect the bluetooth headset midgame? Note, it is VERY loud according to them.~

~Note, this affected the friend on Windows completely, not Linux at all.~

Edited, this is a separate issue I brought up and one I'll encourage the friend in question to submit

Frooxius commented 5 months ago

When you say that users are inaudible, does this mean other audio still works? Like sound effects, multimedia and such?

gentlecolts commented 5 months ago

unplugging the receiver

The headphones and laptop in question both have their own built in bluetooth, no dongle was involved in this testing

does this mean other audio still works?

yes, only user voices were inaudible, other game audio was working fine

ohzee00 commented 5 months ago

I'll edit my comment then, I jumped the gun when I was debugging a extremely similar issue last night.

gentlecolts commented 5 months ago

If I might offer some gut-feel intuition, since bluetooth mode operates at a lower bitrate than your typical mic/speaker, perhaps the voice stream isn't handling that particular aspect as gracefully as the rest of Resonite's audio

liny-fox commented 5 months ago

Try recording audio using an external application and playing sound using an external application as well to make sure you can do both though the headset outside of resonite. I remember LONG time ago having problems with bluetooth on windows where it would go to low quality phone profile if the mic was touched and would only have high quality audio without the mic.

gentlecolts commented 5 months ago

Try recording audio using an external application

not really the point since Resonite had no problem picking up my mic, and no problem playing non-voice audio, but I actually was on vrchat just before this session with it in headset mode and it was working as expected

Frooxius commented 5 months ago

If non-voice audio works, while user voice audio doesn't, this is a very strange problem. There's not anything super "special" about use voice audio - it's mixed together with all other audio, so it's very odd that user's voice is not playing, while other audio is - those two are mostly inseparable.

This would mean it needs to be something happening during the user voice audio receiving/decoding, but I don't see how a bluetooth headset could possibly affect that process, since it doesn't interact with those systems at all.

Whenever this happens, could you open the user voice stream in the inspector and take a note of the diagnostic values there? Ideally recording a video.

gentlecolts commented 5 months ago

user voice stream in the inspector and take a note of the diagnostic values

I can do that, could you send a screenshot with an example of where to look?

Frooxius commented 5 months ago

You want the section which shows the graph. I can't send screenshot right now, if someone else can get that, it would help.

epicEaston197 commented 5 months ago

You want the section which shows the graph. I can't send screenshot right now, if someone else can get that, it would help.

Is this what you're looking for? image

RockstarRaccoon commented 5 months ago

Just ran into this issue again, no mention of audio issue in the log, but obviously it just doesn't work. Everything was working fine until tonight when it randomly went out in the middle of a conversation, and even restarting the whole computer doesn't seem to be fixing it.

Edit: just realized that this issue is new, and not talking about when this was happening last month.

To clarify, both now and last month, it doesn't seem to be an issue of the Bluetooth, it seems to be an issue that Resonite itself just stops bothering to process anything but broadcast audio.

gentlecolts commented 5 months ago

it seems to be an issue that Resonite itself just stops bothering to process anything but broadcast audio

I don't think that's quite correct in regards to this bug, I tested same headphones, computer, the issue I experienced here was only present when connected in headset mode, and switching back and forth consistently confirms this

Frooxius commented 5 months ago

@epicEaston197 Yes thanks! That's the graph I'd need to see.

@RockstarRaccoon @gentlecolts It's important to keep it clear what exactly stops working here. Is it just broadcasted audio? So if someone goes to broadcast, does their voice come back? What about sound effects from props? Do those work?

These are very key, because they could point to where the issue could be coming from and they can be very different problems. E.g. if it's specifically spatialized audio that stops working, it could point to issue with Steam Audio for example.

gentlecolts commented 5 months ago

It's important to keep it clear what exactly stops working here

The point I was trying to make was that the presence of audio or lack there of is directly due to the bluetooth headset mode within the context of this issue, the issue they bring up seems to be more of an intermittent/unpredictable one. Those are good points still though, I'll make sure to test different voice modes more thoroughly once I am able

Frooxius commented 5 months ago

It's important to keep it clear what exactly stops working here

The point I was trying to make was that the presence of audio or lack there of is directly due to the bluetooth headset mode within the context of this issue, the issue they bring up seems to be more of an intermittent/unpredictable one. Those are good points still though, I'll make sure to test different voice modes more thoroughly once I am able

I understand your point, but the problem is that there's no clear cause right now. Depending on what exactly breaks, we can start narrowing it down, but with that being ambiguous, there are several big areas of what could be the source of the problem, without ability to tell which one it is.

RockstarRaccoon commented 5 months ago

@RockstarRaccoon @gentlecolts It's important to keep it clear what exactly stops working here. Is it just broadcasted audio? So if someone goes to broadcast, does their voice come back? What about sound effects from props? Do those work?

Sorry, yes. When I encounter this error, any broadcast audio still works. If someone switches to broadcast, I can hear them, but if they switch back to any sort of attenuated audio (The green or yellow) I can't hear them anymore. I can't hear doors in the cloud home, but I can hear the broadcast sound it plays when you are outside. I can't hear videos normally, but I can hear them when they are set for broadcast.

The error seems to be in some part of the code for the attenuated audio, but a part that doesn't apply for broadcast.

Frooxius commented 5 months ago

That does sound like it's an issue that comes with audio spatialization, for which we are using Steam Audio.

There's a newer version available, so the first step here would be to just update and see if that happens to fix things.

RockstarRaccoon commented 5 months ago

I guess I'll try that when I get on later.

Frooxius commented 5 months ago

Oh it's not something you can do on our end, we'll need to update the integration on our end and push a new build.

One thing you can try though is for any sound source that you can't hear, uncheck the "Spatialize" checkbox for it.

gentlecolts commented 5 months ago

Very good call on spacialized audio btw, it does seem to be because of that

https://mega.nz/file/WZdyALjZ#S-ba5vjNZUNY4HxB6RN3MI3sYn5XSAWyO-Lb0vYM6as

RAICHU - 2023.12.21.1127 - 2023-12-27 16_13_45.log

gentlecolts commented 5 months ago

Actually now that I think about it, headset mode is a mono output device, rather than l/r, i wonder if that maybe factors in as well?

Frooxius commented 5 months ago

Does the headset start as Mono? Or does it switch to Mono at some point?

Can you provide a Player.log file as well? That might contain errors from Steam Audio.

gentlecolts commented 5 months ago

Can you provide a Player.log file as well?

Where would I locate this (linux)?

gentlecolts commented 5 months ago

Does the headset start as Mono? Or does it switch to Mono at some point?

I'm not quite sure but I suspect from the perspective of resonite it is starting as mono. I quit resonite before changing between high quality and headset modes, so resonite never "saw" the switch.

gentlecolts commented 5 months ago

Can you provide a Player.log file as well?

Where would I locate this (linux)?

found it at ~/.local/share/Steam/steamapps/compatdata/2519830/pfx/drive_c/users/steamuser/AppData/LocalLow/Yellow Dog Man Studios/Resonite/ Player.log

RockstarRaccoon commented 5 months ago

Had this bug happen again the other night. Was in a private world, put on my Bluetooth headset, was having a conversation, someone joined the world, and then I realized I couldn't hear the new person. Rejoined the world, couldn't hear anyone, but I noticed something really really weird that I think is important here...

I was hearing one pair of users, as if they were broadcasting, who were having a conversation away from the group. It was less as if the spatialized audio was muted and more as if it was just spatializing me to a location that I wasn't at.

The first thing makes me wonder if it is having a problem adding new audio sources to spatialization, the second one makes me wonder if it's having a problem with positioning me within the spatialized audio.

Wasn't up to really exploring it at that moment, but restarting Steam without the Bluetooth headset worked.

Does this system work by sending signals to the Steam system you mentioned? Perhaps the problem is in the signals, perhaps there is some variation you need to do when there is a Bluetooth headset in play.

shiftyscales commented 4 months ago

Assigning @Frooxius as it sounds that the next step we have for this issue is updating our Steam Audio dependency, and seeing if it resolves the issue.

A Player.log file was provided above as requested- but I don't see anything in it that seems immediately applicable.