Re: [Audacity-devel] BUG: Audacity and Pulseaudio issue (was: Audacity hangs in Ubuntu pressing spa
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
From: Al D. <bus...@gm...> - 2009-12-20 21:03:38
|
On Sat, Dec 19, 2009 at 12:36 PM, Luigino Bracci <lb...@gm...> wrote: > > 2009/12/19 Al Dimond <bus...@gm...> >> >> This is a known bug. ALSA/default on most Linux distros today makes >> output go through PulseAudio, and there's a deadlock when stopping and >> starting streams repeatedly somewhere between Audacity, our PortAudio >> ALSA layer, ALSA's pulse output plugin, and the Pulse client >> libraries. > > Hi Al, Thanks you for your response. > > Just a suggestion: What if Audacity opens the connection to Pulseaudio at > startup, keeps it open all the time, and closes it when Audacity finishes? > If the problem is opening/closing connections, that can help to keep > Audacity stable with Pulseaudio. > I'd like to do this (both for PulseAudio and JACK). Currently our audio abstraction layer, PortAudio, doesn't directly support Pulse, which makes this difficult. Adding Pulse support to PortAudio and a persistent server connection mode (we certainly don't want a persistent connection unless it's to a server) to Audacity seems like a pretty big change to make before 2.0 (I definitely won't be able to work on it until I'm back home in a week; if the 2.0 timeline is long it might be worth a shot... I'm just not sure what the plans are there). I assume that if I write a Pulse backend for PortAudio it will take a very long time for it to be adopted upstream, but the changes would be essentially be isolated, so that would probably be OK. > As I've explained before, my real problem with Audacity is not hitting > spacebar too fast. I have six users editing multitrack audio using Audacity > in Ubuntu 9.04 (they work with 5 or 6 tracks; the tracks have a length of a > few seconds to a hour). They use Audacity in their full-time job as radio > producers, but Audacity hangs while editing, at least 4 or 5 times at a day. > It's hard to trace and reproduce this bug, I just noticed it happens more > when my users play/stop using spacebar. > > I did the hitting-spacebar-many-many- > many-times thing as a way of reproduce this bug so I can report it here > easily, but it would be nice to see Audacity without all that inestability. > > >> >> You'll probably notice that when you use ALSA/hw:0,0 there's a long >> delay between hitting Play/Record and the stream starting. This is >> because when you do that Pulse temporarily suspends itself, which >> takes time. If you really need to use hw:0,0 you should disable >> PulseAudio temporarily while you do. To do that: open up the >> PulseAudio volume control applet, click on the "Configuration" tab, and >> choose the profile "Off" for your sound card. When you're done with >> Audacity and want the rest of your sound stuff to work again, choose >> the profile you were using before. But you probably don't really need >> to use ALSA/hw:0,0 when using Audacity. Just try not to hit the >> spacebar too fast. > > I'm thinking on uninstalling Pulseaudio and use dmix or ESD. What do you > think is better? I need to get the most stability in Audacity as possible, > without blocking the sound in other applications; unfortunely, finding > soundcards in my country with hardware mixing capabilities is near to > impossible. > >> >> One of these days one of the following will happen, in ascending order >> of likelihood: (1) I'll figure out what's going on and fix it (2) >> Someone smarter than me will do it (3) Someone (maybe me) will >> implement proper libpulse support in PortAudio and it will all go >> away. > > I think that solving this bug is very important for Audacity 2.0; many, many > people uses Audacity under Ubuntu using cheap hardware, and many of them > feels that Audacity is very unstable, apparently for the Audacity/Pulseaudio > issue. > I agree... unfortunately it's been really tough to find the bug and the workaround is a large change. This was the first I'd heard of people being impacted by this hang in real-world situations since the transcription slider change... and then, like clockwork, I ran into it while editing some concert tracks on Friday. - Al |