-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Telegram causes music in rhythmbox (gstreamer applications) to play faster!? #1548
Comments
I can now reproduce the bug, but I have no clue how to figure out what causes it. strace is so big that it's a couple hundred megabytes big with all the pulseaudio stuff going on. Steps to reproduce (any Ubuntu with GNOME or GTK3 installed (also XFCE)):
This will crash the pulseaudio frequency (or timer!?), so track will be played back around 1,5x times faster. Fixes:
When Sound Settings window was initialized, the bug is fixed. Can be reproduced afterwards following the steps above (telegram must be closed and re-opened, also from the systray bar). |
Hey there! We're automatically closing this issue since there was no activity in this issue since 372 days ago. We therefore assume that the user has lost interest or resolved the problem on their own. Closed issues that remain inactive for a long period may get automatically locked. Don't worry though; if this is in error, let us know with a comment and we'll be happy to reopen the issue. Thanks! (Please note that this is an automated comment.) |
This bug has not been magically fixed. It is still active and still telegram is causing change of frequency on devices that have not 44kHz by default. |
Is this Telegram issue for sure? |
I've been using the same identical setup for over 5 years now. It is telegram, for absolutely nothing-else-breaks sure. Every other application, even games, work perfectly without any issue. Telegram keeps always resetting the frequency of the sound device, which it should not do. Eversince I reported this bug, this issue stays the same and is still causing troubles for devices that have no 44.1kHz frequency. Yes it is confirmed, the current version of Telegram is still causing the same problems. Yes everything is as up-to-date as possible; as I'm using ArchLinux. Yes, it is still the same issue on Debian Jessie, Ubuntu 16.10, ArchLinux and even on XFCE setups. So this is definitely a Telegram Bug, and nothing that is caused by the sound daemon. Any other application that plays back sound will be affected, even Chromium, Firefox, GNOME mplayer (and every other app you can imagine) because Telegram keeps resetting the goddamn frequency to 44.1kHz. That is what Telegram is causing and no other App is causing. I cannot report or explain the bug in more detail, as this is exactly what happens. 100% of the Telegram opening time. 100%. Every single start of Telegram resets the device frequency, reproducible. I am definitely sure the code that causes this problems is either media_audio_ffmpeg_loader#L201 or media_child_ffmpeg_loader#L72 as both have static comparisons of frequencies until they re-initialize the audio setup. And that is exactly what both methods shouldn't do. If they can't support the frequency, just do nothing. |
I have the same issue too and came here to open a ticket about it. Arch Linux here. If I'm playing music in CMUS, VLC, Rhythmbox, etc., and then I start Telegram, the audio stream pauses for a moment, Telegram loads, and then the audio resumes at a higher pitch. The only fix I've seen is to do |
This is a huge issue on Windows 7 platform as well. I use MOTU 828MKII audio interface for music production and I try to run my system on one single sampling rate no matter what. (48khz, 96khz or what ever I need or the project was made in) and every single time I start telegram it'll reset the sampling rate to 44.1khz and all the other programs are still expecting another sampling rate and audio is slowed down because of the mismatch. It's even more infuriating since I have disabled sounds on telegram and thus the audio initialization routine is completely unnecessary. Resetting the sample-rate back to what ever it was isn't that simple since it can't be done from my audio interfaces driver unless the audio device isn't being used at all (I have to shut down all applications using it first) What ever the case may be, Telegram should respect the current sampling rate of the system and never ever try to change it on its own. What would be better, if I could set the sample rate that telegram requests from the system like in any decent audio software if I know what i'm doing (default to current sampling-rate by default add a tick "request sampling rate" on advanced menu). |
@mtaalas Telegram uses OpenAL library for notifications audio and music / voice messages / video files playback. Perhaps this could be reported there. Or maybe I use the library wrongly :( |
Hello, is there any progress on this issue? It's been more than 3 years and the problem still persists on devices that use any sample rate other than 44.1kHz (e.g. I use an external Focusrite audio interface running at 48kHz). This is annoying and the only workaround so far is not using Telegram Desktop at all. |
+1 to this issue. Like @zerodayyy, I also have a Focusrite interface. Every time Telegram Desktop is launched, all of my system audio gets sped up. The only way to work around this is by having Telegram auto-launch on boot and manually restarting pulseaudio with |
I have the same issue. I am using Ubuntu 19.04. I have a Behringer UMC204Hd audio interface connected. I can usually fix this problem by just opening Ubuntu settings and just navigating to sound options. Does this fix work for you guys as well? @zerodayyy @Lerke |
No, that doesn't work for me. Anyway, I'm still waiting for that to be
fixed.
…On Sat, Oct 5, 2019, 2:53 PM Aryojaam ***@***.***> wrote:
I have the same issue. I am using Ubuntu 19.04. I have a Behringer
UMC204Hd audio interface connected. I can usually fix this problem by just
opening Ubuntu settings and just navigating to sound options. Does this fix
work for you guys as well? @zerodayyy <https://github.com/zerodayyy>
@Lerke <https://github.com/Lerke>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1548?email_source=notifications&email_token=AL24WPZR7SGHMAJDGVYHXT3QNB52BA5CNFSM4BZLYHG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEANQWGQ#issuecomment-538643226>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AL24WP7WDRSVKMN6TNGJ4VLQNB52BANCNFSM4BZLYHGQ>
.
|
Same issue here with Ubuntu 19.04 and NI Komplete Audio 2 interface. For me it's "fixed" by (temporarily) switching to a different device in the Sound Settings. |
I have the same issue! I own a Behringer u-phoria umc202hd, and if I'm watching a person talking in a youtube video and open telegram, I get a pop, a pause, and the sound resumes but the person inhaled some helium until I |
I can always reproduce the bug when I do the following: I am using Ubuntu 19.04. I have a Behringer UMC204Hd |
I have the same problem with Behringer UMC202HD and Kubuntu 19.10. |
This bug is absolutely infuriating. I've stopped using telegram on desktop because of it. I've ran so many OpenAL based applications that it's obvious it's been used incorrectly here. Please fix this bug, I'm using the desktop app to contact friend & family during isolation. My mobile internet signal is so bad, I'm having to put my phone upstairs. I'm going to take a peek at the code. Any info on what file the openal starting code is? Edit: Ok, I see someone posted a link above to something that might be the problem. I can't deal with that. Blender can switch sample rates without messing up other software. Take a look at what it does to VLC, it turns it into a stuttering mess. Shame, I really like Telegram. |
i think he is wrong. That code converts the stream with ffmpeg, which doesn't communicate with sound system at all More likely that the bug is caused by the direct channels flag or by microphone testing which is called at start
Would be more helpful if you provide full list of them |
Blender, Dolphin, mumble, virtually every game. Gish, Doom3, Colin McRae DiRT, ioquake3, Jedi Knight: Jedi Academy, Prey, Psychonauts, Quake 4, X3: Reunion, Alien Isolation, Minecraft. Why am I listing software? Virtually everything uses OpenAL on Linux because it's awesome. It's quite clearly Telegram that's having the issue. Edit: Thanks for the links. I'll take a look. :) Edit2: Hmm. I've been using Blender all day, my brain is pooped. |
Doesn't uses OpenAL if you're about KDE's Dolphin |
they're too AFAIK |
I know it would not be a fix at all, but maybe an option to disable recording would help people like me. I do not use Telegram for calls or voice mails. |
One thing I saw after a quick look is that OpenAL asks for a specific sample rate from pulseaudio https://github.com/kcat/openal-soft/blob/master/alc/backends/pulseaudio.cpp#L662 Maybe this confuses ALSA or the hardware in this case. But I don't know pulseaudio that much. |
Good find. I looked into it but unfortunately it was a dead end again.
I tried changing the hardcoded frequency and sample format to my native
audio interface format, but the distorted audio still occurs.
The problem appears as soon as OpenAL calls into pa_stream_new.
I also tried using pa_stream_new_extended instead (see
https://freedesktop.org/software/pulseaudio/doxygen/stream_8h.html#acf41f201c5e6ac94b7fcbc8626b6c933),
where instead of hardcoding a sample rate and format, you can give a
list of acceptable formats and Pulseaudio will figure out what is the
most suitable format. Sadly this was a dead end too.
I think at the end of the day this is still an Alsa problem, openal-soft
is not really doing anything wrong even when that hardcoded probe
frequency seems a little suspicious.
Edit: In case anyone wants to try this out again, attached is a patch on top of openal-soft that uses another hardcoded frequency but still reproduces the distorted audio. Build openal-soft as usual and start the new distorted_audio program in the build/examples folder.
[0001-Reproducable-distorted-audio.patch.txt](https://github.com/telegramdesktop/tdesktop/files/5423680/0001-Reproducable-distorted-audio.patch.txt)
…On Wed, Oct 21, 2020 at 11:12:56PM -0700, Pixelnarium wrote:
One thing I saw after a quick look is that OpenAL asks for a specific sample rate from pulseaudio https://github.com/kcat/openal-soft/blob/master/alc/backends/pulseaudio.cpp#L620
Maybe this confuses ALSA or the hardware in this case. But I don't know pulseaudio that much.
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#1548 (comment)
|
Why not just to remove |
You are right that would have the same effect.
I just tested it though and it does not work either.
…On Thu, Oct 22, 2020 at 10:59:42AM -0700, ilya-fedin wrote:
> I also tried using pa_stream_new_extended instead
Why not just to remove `PA_STREAM_FIX_FORMAT | PA_STREAM_FIX_RATE | PA_STREAM_FIX_CHANNEL` flags?
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#1548 (comment)
|
Same issue with a Focusrite Scarlett Solo gen1, setting pulseaudio to 96khz doesn't fix the issue. fwiw the Zoom linux client does the same thing. |
Wow, it is good to know that not only tdesktop is affected |
sooo, 3rd party? |
We still don't know why exactly this happens :( |
Some observations on my (!) system (sorry if this was already known, this issue is kinda long). The interface is a Steinberg UR22 MK2.
What I did not test:
Personally I think all this hardware needs some kind of quirks settings at the kernel level if it is not a kernel bug for USB Audio in general. Since nothing reports any issues or changes while playing I think the hardware gets confused when the output sampling rate is not in a good combination with the input sampling rate when the specific hardware call happens. Since I could not find the Kernel Bugzilla entry in here, here is the link from the OpenAL issue above: |
Okay, since this issue is interesting I tried something more. I set up a pure ALSA system and tried some things:
I found a similar issue on the Pulseaudio Bug Tracker: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/944 Maybe we should ask there. |
Yup I have the same pulseaudio-alsa package installed. I did not know that it redirects Alsa sound to pulseaudio, but if it does like you said it does, then this is indeed a pulseaudio problem, which is good news because that would be way easier to debug than a bug deep inside the kernel audio system. |
Today I noticed that pipewire finally got sound support and could be enabled on arch by installing pipewire-alsa, pipewire-pulse, pipewire-pulse-dropin and lib32-pipewire-pulse-dropin package (the last one is needed if 32-bit applications like wine are used, two last ones are from AUR) and editing the last line of /etc/pipewire/pipewire.conf to In case if anyone want to test if this bug is present with pipewire and report it to them, since pulseaudio development seems to be very slow |
I also have audio speed up on 2.5.5 beta, but only when I'm calling or receiving a call. Just launching telegram and receiving sound notifications is fine. before I accept a call I physically turn on +48V mic on usb sound card. the fix after the call is to kill pulseaudio to make it restart. |
There's probably nothing we can do about that since there's a bug with handling different sample rates on pulseaudio side |
I am also using a Steinberg UR22 MK2 interface and had the same issue. I reinstalled my PC and forgot that i had set a fixed sample rate of 48kHz in my /etc/pulse/daemon.conf before, so the issue popped up again. With a fixed sample rate the issue does not happen. This is a general issue with external USB audio interfaces and pulseaudio. These are the settings i use:
|
Maybe some another application is forcing PA to 44100? I've seen that PA switches to another sample rate when some application requests it and there are no other application playing at the same time and it doesn't reset to default sample rate when the playback is finished |
I just set up Pipewire to replace Pulseaudio on my system. I can report that the problem does no longer appear when using Pipewire on my system (Version 1:0.3.21 on Arch Linux) |
Same. I have installed pipewire 0.3.19 and the problem is gone. |
Hey there! This issue was inactive for a long time and will be automatically closed in 30 days if there isn't any further activity. We therefore assume that the user has lost interest or resolved the problem on their own. Don't worry though; if this is an error, let us know with a comment and we'll be happy to reopen the issue. Thanks! |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
When I startup telegram, the music in my applications play around 1.5 times the usual speed. I have not yet any kind of hint what causes the bug to appear, I just know that it always happens when starting Telegram.
Hardware used: Intel NUC (i5 and Intel Audio dedicated hardware, no additions).
OS used: UbuntuGNOME 15.10
Does anybody have an idea how to debug such a thing? Is it most likely pulseaudio-related?
The text was updated successfully, but these errors were encountered: