tdesktop icon indicating copy to clipboard operation
tdesktop copied to clipboard

Telegram not see audio interfaces which was plugged after Telegram launch

Open NTMan opened this issue 1 year ago • 24 comments

Steps to reproduce

  1. Launch Telegram
  2. Paring bluetooth headset or connect external audio interface

Screenshot from 2024-01-26 13-15-10

Expected behaviour

Sound present in headset then I listen sound in Telegram

Actual behaviour

No sound until Telegram restarted

Operating system

Linux Fedora Rawhide (Pipewire)

Version of Telegram Desktop

4.14.11 beta

Installation source

Static binary from official website

Crash ID

No response

Logs

No response

NTMan avatar Jan 26 '24 08:01 NTMan

The same thing with other connected device after Telegram already started. Telegram can not use sound device that was connected after start.

VladimirMrzv avatar Jan 26 '24 08:01 VladimirMrzv

Yeah, that's unlikely to be solved because the cross-platform audio library tdesktop uses doesn't provide a way to get device list updates and there's no one with the knowledge of Linux native audio APIs (there are workarounds for Windows and macOS written using native APIs). That's something you have to get used to if you don't plan to help with the implementation.

ilya-fedin avatar Jan 26 '24 11:01 ilya-fedin

@ilya-fedin, yes, the node version 4.14.11 beta is beta, everything worked correctly

kartavenko1983 avatar Jan 30 '24 19:01 kartavenko1983

@kartavenko1983 node version? which node?

ilya-fedin avatar Jan 30 '24 19:01 ilya-fedin

@ilya-fedin I'm sorry, I'm using a translator, I probably translated it incorrectly I meant that the telegram version 4.14.11 beta everything worked correctly. That is, telegram saw the connected audio interfaces

kartavenko1983 avatar Jan 30 '24 19:01 kartavenko1983

The thing is it doesn't anymore and chances that it would be fixed before stable release (or at all) are low because there's no one to fix the bug

ilya-fedin avatar Jan 30 '24 19:01 ilya-fedin

@ilya-fedin Are your people running away? Is there no one to work?

kartavenko1983 avatar Jan 30 '24 20:01 kartavenko1983

@kartavenko1983 Telegram's paid developers work on linux support in spare time (linux is not of interest for business due to low market share), their spare time is little and Linux support was almost non-existent before 2020 when I started volunteering (it was launching but with lots of bugs and unimplemented features). I'm the only person volunteering for Linux support from outside but I can't fix this because I have no experience with Linux audio APIs (I know what should be done but I don't know the APIs to do that). And the paid developers too, as far as I know. So unless someone else with pipewire/pulseaudio/alsa knowledge would volunteer, the bug is likely to become a long standing one.

ilya-fedin avatar Jan 30 '24 20:01 ilya-fedin

@ilya-fedin Let's see how events will develop. But, interestingly, if the telegram is restarted, then the audio interfaces are picked up, and if they are disconnected and connected again, then the telegram continues to work correctly.

kartavenko1983 avatar Jan 30 '24 20:01 kartavenko1983

But, interestingly, if the telegram is restarted, then the audio interfaces are picked up, and if they are disconnected and connected again, then the telegram continues to work correctly.

This sounds expected to me. The audio device is closed when there's nothing to play so as long as the system can open it again, it will work.

ilya-fedin avatar Jan 30 '24 22:01 ilya-fedin

@ilya-fedin I see, thanks. Here is another open problem on a similar topic.

#27421

kartavenko1983 avatar Jan 31 '24 07:01 kartavenko1983

Why did you create a duplicate if you see there's already an issue?

ilya-fedin avatar Jan 31 '24 07:01 ilya-fedin

@ilya-fedin I saw this topic later than I opened a new one.

kartavenko1983 avatar Jan 31 '24 07:01 kartavenko1983

but you can close it now

ilya-fedin avatar Jan 31 '24 08:01 ilya-fedin

Most annoying thing that with "Default" input/output device Telegram not have sound after connected new headset. The fact that you cannot select a specific device in the telegram itself is not such a necessary function as the absence of sound as such.

NTMan avatar Jan 31 '24 10:01 NTMan

@NTMan You can turn on playback or make a call, and then connect the headset, then the sound will appear. Or restart the telegram after turning on the headset.

kartavenko1983 avatar Jan 31 '24 11:01 kartavenko1983

Or restart the telegram after turning on the headset.

Typically this has to be done after the call was answered. Everything happens in the following sequence:

  1. The call come to Telegram.
  2. I put the TWS in my ears (which are establish connect with my workstation in the background)
  3. I press the answer button in telegram.
  4. I understand that I can’t hear my buddy.

NTMan avatar Jan 31 '24 11:01 NTMan

Most annoying thing that with "Default" input/output device Telegram not have sound after connected new headset.

Yeah, it should be simpler to fix just that but there's a conflict between Windows/macOS and Linux behaviors here. So I'm not sure I will get a permission to do that and a fully involved fix will then be needed to implement the same code as for Windows/macOS (what I can't do as already explained).

ilya-fedin avatar Jan 31 '24 14:01 ilya-fedin

@NTMan @kartavenko1983 @VladimirMrzv Please check the released 4.14.12 version, I hope it works as before or better.

john-preston avatar Feb 01 '24 17:02 john-preston

@john-preston, @ilya-fedin, Yes, everything is working correctly, thank you very much

kartavenko1983 avatar Feb 01 '24 20:02 kartavenko1983

@john-preston Almost perfect, it would be perfect if devices appear and disappear without re-opening the window on fly.

Demonstration

NTMan avatar Feb 01 '24 22:02 NTMan

It works by re-requesting the device list when opening the dialog (like before the beta). There's sadly no one to write the code to get change on the fly like done on Windows/macOS as mentioned earlier.

ilya-fedin avatar Feb 01 '24 22:02 ilya-fedin

I came to report a different issue, which I suppose is related? The notification sound always plays on the device that was default when telegram was opened

Example: I open telegram. I connect my bt headphones. A notification arrives. The sound still plays on the laptop speakers.

I'm not sure whether I should open a different issue for this? for context, I'm using Hyprland on Arch Linux, and PipeWire

alba4k avatar Feb 16 '24 20:02 alba4k

@alba4k update to the latest version, it should already be fixed to the previous state

ilya-fedin avatar Feb 16 '24 20:02 ilya-fedin

yeah this can be closed I believe

also idk what that thing is ^^^^

alba4k avatar Feb 29 '24 06:02 alba4k

yeah this can be closed I believe

also idk what that thing is ^^^^

spam.

Aokromes avatar Feb 29 '24 06:02 Aokromes

@ilya-fedin please delete the spam

kartavenko1983 avatar Feb 29 '24 06:02 kartavenko1983

@kartavenko1983 I can't

ilya-fedin avatar Feb 29 '24 07:02 ilya-fedin