audacity sometimes won't start when devices change

This section is now closed.
Forum rules
Audacity 1.3.x is now obsolete. Please use the current Audacity 2.x.x package for your distribution or compile Audacity from the source code.
bgravato
Posts: 2080
Joined: Wed Jan 13, 2010 8:56 pm
Operating System: Please select

Re: audacity sometimes won't start when devices change

Post by bgravato » Mon Apr 12, 2010 11:28 pm

stevethefiddle wrote:
bgravato wrote:it seems that there's a module to send pulseaudio output to jack...
That's what I've been trying to get working on my virtual test machine - not the best test bed for this kind of thing - no joy so far. I'll start a new topic about it if I get it to work.
I just did it and it's working :)

You need to install the package pulseaudio-module-jack and then you need to manually edit some conf file to load the modules... (in my opinion this should be done by the postinst scripts on the package, or at least there should be some note about it in the README file) Anyway you can do this by adding the following lines to /etc/pulse/default.pa

Code: Select all

load-module module-jack-sink
load-module module-jack-source
Restart pulseaudio and then there should be a new device in pavucontrol...

Also you should start pulseaudio after jackd.
stevethefiddle wrote:
bgravato wrote:for what I do and my needs I think jack suits me better and is more powerful...
I use jack on my desktop machine for that same reason, but find the versatility of PulseAudio indispensable on my laptop.
I had trouble getting Audacity to work properly with Jack for years, but now it works great - just wish we had persistent ports rather than ones that disappear every time you click stop.
Sometimes I wish the opposite... if for some reason I need to restart jackd I'll have to close and restart the apps which create persistent ports at startup only... apps that only create/connect the ports when I hit play I don't need to restart them :P
You can try to work around that using the patchbay in jack control
Include as much details as you can in your post (Audacity version, Operating System, Equipment used, etc).
Please post your question in the appropriate forum (regarding audacity version and operating system).

steve
Site Admin
Posts: 80682
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: audacity sometimes won't start when devices change

Post by steve » Tue Apr 13, 2010 1:22 am

bgravato wrote:you can do this by adding the following lines to /etc/pulse/default.pa
Already tried that but still no joy - I've got the device, but Jack locks up as soon as I start PulseAudio.
My VM has become a seriously hacked up machine :mrgreen: , I think I'll do a fresh install before I try again.
bgravato wrote:You can try to work around that using the patchbay in jack control
The problem I seem to have is that I get different Portaudio port numbers each time Audacity starts playing or recording, so the patchbay settings never link up.
Have you ever got that to work? If I could do that I'd be happy :D
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

bgravato
Posts: 2080
Joined: Wed Jan 13, 2010 8:56 pm
Operating System: Please select

Re: audacity sometimes won't start when devices change

Post by bgravato » Tue Apr 13, 2010 1:33 am

stevethefiddle wrote:
bgravato wrote:You can try to work around that using the patchbay in jack control
The problem I seem to have is that I get different Portaudio port numbers each time Audacity starts playing or recording, so the patchbay settings never link up.
Have you ever got that to work? If I could do that I'd be happy :D
You can use regular expressions in the patchbay... I didn't remember that but I checked my patchbay and I found this on one the output side:

Code: Select all

xmms-jack_[0-9]+_000
I use this to connect xmms output to idjc aux input. When I start xmms it will show in jack connections as xmms-jack-<some number>_000
I don't remember how I got to that regexp but probably found it by googling around... :) my regexp skills are not very good... :)
Include as much details as you can in your post (Audacity version, Operating System, Equipment used, etc).
Please post your question in the appropriate forum (regarding audacity version and operating system).

steve
Site Admin
Posts: 80682
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: audacity sometimes won't start when devices change

Post by steve » Tue Apr 13, 2010 3:03 am

bgravato wrote:You can use regular expressions in the patchbay...
Ooh - now that I didn't know - must try it, thanks.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

steve
Site Admin
Posts: 80682
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: audacity sometimes won't start when devices change

Post by steve » Tue Apr 13, 2010 4:37 am

bgravato wrote:You can use regular expressions in the patchbay...
Fantastic :mrgreen:

Tried Googling, but came up with zilch - just references that it could be done, but no clue as to how.

Finally, after a good bit of trial and error...

For left and right inputs in Audacity:

Code: Select all

in_d*[13579]$
in_d*[02468]$
For left and right outputs from Audacity:

Code: Select all

out_d*[13579]$
out_d*[02468]$
So easy when you know how - real-time effects in Audacity, fantastic :D
Thanks for the tip bgravato

Steve
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

bgravato
Posts: 2080
Joined: Wed Jan 13, 2010 8:56 pm
Operating System: Please select

Re: audacity sometimes won't start when devices change

Post by bgravato » Tue Aug 31, 2010 2:01 am

I'm still knocking my head on the original problem on the first post in this thread...

Still getting the pcm error and audacity won't start... Deleting the audacity.cfg file doesn't solve the problem...

Just to refresh this is what I get when starting audacity from the command line:

Code: Select all

$ audacity
jack_client_new: deprecated
jack_client_new: deprecated
jack_client_new: deprecated
jack_client_new: deprecated
jack_client_new: deprecated
jack_client_new: deprecated
jack_client_new: deprecated
jack_client_new: deprecated
jack_client_new: deprecated
jack_client_new: deprecated
jack_client_new: deprecated
jack_client_new: deprecated
jack_client_new: deprecated
jack_client_new: deprecated
jack_client_new: deprecated
jack_client_new: deprecated
audacity: pcm_plug.c:388: snd_pcm_plug_change_channels: Assertion `snd_pcm_format_linear(slv->format)' failed.
Aborted
$ 
And I have .asoundrc so that jack will be the default pcm device (through jack's alsa pcm port):

The relevant parts of my .asoundrc:

Code: Select all

pcm.jackplug {
	type plug
	slave { pcm "jack" }
}

pcm.!default {
	type plug
	slave { pcm "jack" }
}

pcm.jack {
	type jack
	playback_ports {
		0 alsa_pcm:playback_1
		1 alsa_pcm:playback_2
	}
	capture_ports {
		0 alsa_pcm:capture_1
		1 alsa_pcm:capture_2
	}
}
Audacity 1.3.12 (from official Debian testing)
jackd 1.9.4+svn3842-2 (from non-update official Debian testing or sid)

I'm currently upgrading to jackd2 and I'll see if that makes any difference...

My guess is that this might be related to my .asoundrc configuration and the use of jack's alsa-pcm port...
Include as much details as you can in your post (Audacity version, Operating System, Equipment used, etc).
Please post your question in the appropriate forum (regarding audacity version and operating system).

bgravato
Posts: 2080
Joined: Wed Jan 13, 2010 8:56 pm
Operating System: Please select

Re: audacity sometimes won't start when devices change

Post by bgravato » Tue Aug 31, 2010 3:05 am

Upgrading to jackd2 will break too many things on my system for me to be able to fix right now... So I'm sticking to jackd1 for now...

Anyways regarding this problem. I've found 2 workarounds:
1) edit .asoundrc and remove the redirection of default pcm to jack alsa-pcm port
2) edit audacity.cfg and change Playing and Recording devices to "ALSA: jack"
Include as much details as you can in your post (Audacity version, Operating System, Equipment used, etc).
Please post your question in the appropriate forum (regarding audacity version and operating system).

bgravato
Posts: 2080
Joined: Wed Jan 13, 2010 8:56 pm
Operating System: Please select

Re: audacity sometimes won't start when devices change

Post by bgravato » Sat Oct 30, 2010 12:22 pm

The problem seems to be half-solved since I upgraded to the latest debian package version of audacity (1.3.12-5 -> 1.3.12-6)

From debian's changelog:
* Build with jack on all architectures (Due to a bug, jack was already
enabled on all architectures except on i386, amd64, powerpc).
The "jack_client_new" error message I was getting before is now gone.

Though audacity still fails to start when it can't open the devices in the configuration file (PlaybackDevice and
RecordingDevice parameters) with the same error message as before:

Code: Select all

$ audacity
audacity: pcm_plug.c:388: snd_pcm_plug_change_channels: Assertion `snd_pcm_format_linear(slv->format)' failed.
Aborted

steve
Site Admin
Posts: 80682
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: audacity sometimes won't start when devices change

Post by steve » Sun Oct 31, 2010 7:35 pm

Have you tried the current SVN code?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

bgravato
Posts: 2080
Joined: Wed Jan 13, 2010 8:56 pm
Operating System: Please select

Re: audacity sometimes won't start when devices change

Post by bgravato » Sun Oct 31, 2010 8:27 pm

stevethefiddle wrote:Have you tried the current SVN code?
No. :)

Should I?

Locked