-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Audio drops out intermittently #158
Comments
I am using ALSA output in LMMS, and using PulseAudio for my system. It seems that if you have another program that using audio output, the chance of getting glitchy sound is high. Work around:
|
Interesting find. I am also using ALSA output with PulseAudio for my system. I'll have to experiment around with this, thanks for the tip. |
it seems in general that pulseaudio is glitchy with most programs. i find if i kill pulseaudio and stop it from respawning LMMS will work fine. the way to do this as a user and not system wide is create a file ~/.pulse/client.conf with contents autospawn = no and killall pulseaudio in the terminal. |
@mikobuntu Besides LMMS, I did notice that some programs renders glitchy sounds. However, some program render sounds very well with pulse audio. I suspect this issue is the problem of ALSA compatibility layer for pulse audio. I am not sure tho. |
Surprising finding! It seems that this bug is eliminated with the following setting: I wonder why it said Again, I guess that it could be a bug of ALSA compatibility layer for pulse audio. |
When you select ALSA in the settings, you have to edit the "device" textbox to point directly to your sound device (it is "hw:0,0" for me but may vary between systems and soundcards). There's instructions in the old wiki on how to find out your soundcard designation. Otherwise, PA will intercept the ALSA output (this is the compatibility layer in PA), and even though you select ALSA it will be output via PA. Unless you do this trick, there isn't likely to be much of a difference between choosing PA or ALSA output. The only downside is, that this hogs the soundcard entirely for LMMS, and no other software can output audio. Note - if you use this method, don't try to view youtube videos while LMMS is open! It will hang your browser. |
|
On 01/30/2014 11:09 AM, wongcc966422 wrote:
How's the latency? For me PA is unusable, it gives a noticeable delay |
Wouldnt that be easily fixed by increasing or decreasing buffer size? On Thursday 30 January 2014 01:42:49 Vesa V wrote:
|
On 01/30/2014 11:54 AM, eagles051387 wrote:
That doesn't work very well on PA. Causes glitches if you set the buffer That's been my experience at least. |
PA is not made for realtime audio, that's it. When I developed the PA backend in LMMS a few years ago I tried everything to mitigate the latency problem but failed, as AFAIR PA dictates the buffer size. So all we can recommend is to continue using ALSA which works best in most cases. |
On 01/30/2014 01:40 PM, Tobias Doerffel wrote:
One thing that I'd like to suggest for making it easier to the user to |
This is implemented in the new setup dialog from the old master branch which is going to be backported for one of the next releases. |
I cna confirm this issue still exists for me. but ironically when i switched from alsa to pulse audio the issue went away all together. |
On 02/01/2014 01:24 AM, eagles051387 wrote:
Did you have the ALSA device setting pointed directly to your hardware |
I used the default settings that lmms had set On Friday, January 31, 2014 03:28:31 PM Vesa V wrote:
|
On 02/01/2014 02:23 AM, eagles051387 wrote:
In that case your ALSA output was probably intercepted by PA which Try this: Follow the instructions there to find out your device designation and |
guys dont forget you can also change your sound server (ubuntu , and probably linux variants) by using "gstreamer-properties" in the terminal :) |
I think this is the same bug that in Pulseaudio 4.0 that is now also affecting Skype. The Pulseaudio devs seem to have written about it here, and provided a fix/workaround as well: Basically you have to run: |
60ms is way too much latency. You can easily get to 10ms latency with ALSA/Jack on almost any hardware. |
Is this still an issue? I've been using lmms with alsa for over 2 years now and I never encountered this. Can someone still reproduce? |
Yes, this is still relevant for me and I can confirm that Apple has these identically described issues. 60 seconds is a bit extreme though. Pausing and playing again after about 5 second fixes it every time. |
I have the problem with "glitchy" sounds from time to time when I run LMMS with ALSA in linux mint 17 cinnamon 64bit. The "quick" workaround I have found is to reboot my pc. |
This issue only exists for me when I have additional programs open; but the problem is that I want to livestream my work. I need Firefox open to view stream chat, and OBS to actually stream it, but every time I make a major change to the project, the sound goes kaput. When I open Sound Settings to check, the alsa-plugin for LMMS is rapidly appearing and disappearing from the Applications tab. Also, the issue is not always present when I have multiple programs open. Sometimes when the issue does present itself, it fixes itself after a while. This does not happen often, though. |
@CtrlFreak1337 in addition to PulseAudio you can try using JACK to livestream your work. AFAIK there are 2 ways to use the JACK backend - directly or via the libsoundio backend. You can try both. |
@andrewrk Thanks. I've recently reinstalled LMMS, and the issue doesn't seem to be resurfacing. If it does, though, I'll be sure to look at those alternatives. |
I'm having this same issue. Using Mint 17 Cinnamon, LMMS will work fine for a while, then all of a sudden while previewing instruments, the sound goes distorted. I suspected having the browser open at the same time as LMMS caused the issue so i quit doing that. Even when LMMS is the only program open it still does it. Audio settings are set to use the OS card and my speakers selected as the device. |
I am unable to get any sound from PulseAudio. Is this still an issue with PulseAudio 8.0? |
Yes, it is. The
Would this be OK? |
Old but I may still have this issue on 1.2.0. The sound is incredibly distorted and glitchy (lots of high freq. noise, almost like you took a reverb on master and bitcrushed it), but it always goes away if I adjust the audio volume on my system (arch linux, kde + pulseaudio, sdl as LMMS backend) |
Also when this issue occurs it affects all system sounds, not just LMMS. |
This very easy to trigger, pick one of the default samples/presets available (by hold and click) while playing your track |
Now that I come to think of it, I suspect that it could be caused by CPU issue. If the CPU is at 100%, this may happen. Anyway I'm not going to verify this theory any time soon. I haven't used LMMS for quite a while. |
I can't recreate this issue on 1.3.0-alpha on windows. What's being described sounds a lot like issues with the selected audio driver, not LMMS. Can we close this for now, as I'm not sure what we can do to fix this... @tresf is this still an issue for you? |
I don't use Linux for audio production, but I doubt this was fixed. I believe it's an underrun problem. I patched this to the best of my ability on Windows by setting the lmms.exe process priority from normal to high. I haven't done a similar patch to the Mac or Linux versions, so the QThread priorities are the best we have currently. This should be closed by someone who actually uses Linux for production, and preferably a developer that does so on a slower machine. Alternately we can close and tell users to request a reopen as needed, but I don't think this bug has been addressed in newer versions so I would credit faster machines for the fix, not any code changes. |
Furthermore the patch proposed by @jasp00 has a link to a Debian mailing list, but no cross-reference to the ALSA list which would have needed to implement his patch. So at time of writing this, even our own internal patch seems as if may have been merged prematurely. @jasp00 would know more, but searching for the "don't intercept" https://www.mail-archive.com/pkg-pulseaudio-devel@lists.alioth.debian.org/msg05363.html Regardless, in my testing, PulseAudio isn't the issue, just makes it worse. I have a detailed write-up about this in another bug report, happy to locate and cross-link if needed. |
@tresf if no one is able to reproduce a bug, does it exsit...
combined with
and the fact that you solved it by changing the process priority to high implies that this is an issue with how the OS is handling the audio workload. What can we actually do about this for Mac or Linux? |
That might be a good idea, in case this issue appears again in the future. |
Personally, I produce solely with Mac, and a very fast machine, so hard to guage the impact on that platform, but what I had discovered when I last investigated this is there are some potential instances where our UI theading is incorrectly set as the same priority as the mixer, so something as simple as dragging a Window can make the underrun start and never recover. I'm no expert on realtime DSP scheduling, nor a C++ coder, but I'll find and link my detailed findings last I looked into this... |
@dan-giddins here's the thread: #1600 #1600 is a very good discussion because -- like this thread -- has a lot of mixed results. My testing was performed here: #1600 (comment)
I started a similar cleanup effort here: #4877, but people keep making bug reports faster than we can clean them up. Because this is a pretty major bug, I see no reason to even suggest closing this until someone's fired up an old machine and done some testing. This task only takes a few minutes. What's important to understand is fast hardware as well as faster UI draw routines can mask stuff. As a Java developer, I can state with certainty that Linux often exposes bad code that was working just fine on Windows. It doesn't mean the the bug is specific to Linux, but rather often it's simply less likely to occur due to platform differences. |
I'm using a pentium-based Acer Travelmate B117M (low-powered enough?) as my main driver. My setup is Arch Linux 5.11.7 with wayland/sway and LMMS 1.2.2. I was compiling LMMS from the main branch to increase CPU load while testing this. The problem only occurs with the pulseaudio driver, not with ALSA, SDL or sndio. I tested all of them at least twice to make sure nothing weird is going on, since SDL uses pulseaudio afaik. I can also confirm that LMMS is the only program I use that has weird audio output on pulseaudio. It does go away after a bit of tinkering. The first time, it was after dragging in the sf2 player, the second time after loading a vst. It seems long loading times like to stop the issue? Not sure, since, so far, I only managed to stop it twice. |
This issue seems to have a few unrelated reasons but none of them directly point to LMMS, so i assume this is not our bug. If this issue needs to be open, feel free to reopen. I'm closing for now. |
I get glitchy audio sound about half of the times I open LMMS. Usually it goes away and everything sounds normal again after tinkering around for 60 seconds or so. I am not yet able to reliably duplicate the problem or make it stop when it occurs.
The text was updated successfully, but these errors were encountered: