Audacity tries playback to wrong device while recording

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.
tingo
Posts: 9
Joined: Fri May 06, 2011 6:53 pm
Operating System: Please select

Audacity tries playback to wrong device while recording

Post by tingo » Fri May 06, 2011 7:28 pm

Hello,
I am using Audacity 1.3.13 (FreeBSD ports: audacity-devel) under FreeBSD 8.2-stable. I have also tried Audacity 1.3.12 and Auacity 1.2.4b_9 (FreeBSD port: audacity), and all versions exhibit the same problem. FreeBSD version:

Code: Select all

[email protected]# uname -a
FreeBSD kg-quiet.kg4.no 8.2-STABLE FreeBSD 8.2-STABLE #0: Sun Apr  3 19:49:05 CEST 2011     [email protected]:/usr/obj/usr/src/sys/GENERIC  amd64
May setup is like this: I have an internal sound card, which is used for playback, and a usb device, which is used for recording, it looks like this:

Code: Select all

[email protected]# cat /dev/sndstat
FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64)
Installed devices:
pcm0: <ATI IXP 400> at memory 0xfe029000 irq 17 kld snd_atiixp (1p:2v/1r:1v) default
pcm1: <USB audio> at ? kld snd_uaudio (1p:1v/1r:1v)
pcm0 (shown as "/dev/dsp" in Audacity preferences, devices) is the internal sound card, used for playback
pcm1 (shown as "/dev/dsp1: Line" in Audacity preferences, devices) is the usb sound device, used for recording
First of all; Audacity and this setup works, I can record, and I can playback sound afterwards. There is just one small problem; during recording, there is no sound. Yes, Software Playthrough is enabled.
A bit of debugging shows this (done while Audacity was recording)

Code: Select all

[email protected]# sysctl hw.snd.verbose=2
hw.snd.verbose: 1 -> 2
[email protected]# cat /dev/sndstat
FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64)
Installed devices:
pcm0: <ATI IXP 400> at memory 0xfe029000 irq 17 kld snd_atiixp (1p:2v/1r:1v) default
	snddev flags=0x2e2<AUTOVCHAN,BUSY,MPSAFE,REGISTERED,VPC>
	[pcm0:play:dsp0.p0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000004
	interrupts 1115, underruns 0, feed 1115, ready 0 [b:4096/2048/2|bs:4096/2048/2]
	channel flags=0x2100<BUSY,HAS_VCHAN>
	{userland} -> feeder_mixer(0x00200010) -> {hardware}
	pcm0:play:dsp0.p0[pcm0:virtual:dsp0.vp0]: spd 44100/48000, fmt 0x00200010, flags 0x10000000, 0x00000029
	interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:65536/2048/32]
	channel flags=0x10000000<VIRTUAL>
	{userland} -> feeder_root(0x00200010) -> feeder_volume(0x00200010) -> feeder_rate(0x00200010 q:1 44100 -> 48000) -> {hardware}
	pcm0:play:dsp0.p0[pcm0:virtual:dsp0.vp1]: spd 44100/48000, fmt 0x00200010, flags 0x10000000, 0x00000029
	interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:65536/2048/32]
	channel flags=0x10000000<VIRTUAL>
	{userland} -> feeder_root(0x00200010) -> feeder_volume(0x00200010) -> feeder_rate(0x00200010 q:1 44100 -> 48000) -> {hardware}
	[pcm0:record:dsp0.r0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000005
	interrupts 0, overruns 0, feed 0, hfree 4096, sfree 4096 [b:4096/2048/2|bs:4096/2048/2]
	channel flags=0x2100<BUSY,HAS_VCHAN>
	{hardware} -> feeder_root(0x00200010) -> feeder_mixer(0x00200010) -> {userland}
	pcm0:record:dsp0.r0[pcm0:virtual:dsp0.vr0]: spd 44100/48000, fmt 0x00100010/0x00200010, flags 0x10000000, 0x00000069
	interrupts 0, overruns 0, feed 0, hfree 0, sfree 32768 [b:0/0/0|bs:32768/1024/32]
	channel flags=0x10000000<VIRTUAL>
	{hardware} -> feeder_root(0x00200010) -> feeder_matrix(2.0 -> 1.0) -> feeder_volume(0x00100010) -> feeder_rate(0x00100010 q:1 48000 -> 44100) -> {userland}
pcm1: <USB audio> at ? kld snd_uaudio (1p:1v/1r:1v)
	snddev flags=0x2e6<AUTOVCHAN,SOFTPCMVOL,BUSY,MPSAFE,REGISTERED,VPC>
	[pcm1:play:dsp1.p0]: spd 48000, fmt 0x00200010, flags 0x00002108, 0x00000004
	interrupts 910, underruns 0, feed 909, ready 0 [b:3072/1536/2|bs:4096/2048/2]
	channel flags=0x2108<TRIGGERED,BUSY,HAS_VCHAN>
	{userland} -> feeder_mixer(0x00200010) -> {hardware}
	pcm1:play:dsp1.p0[pcm1:virtual:dsp1.vp0]: spd 44100/48000, fmt 0x00200010, flags 0x1000114c, 0x00000029, pid 58968 (audacity)
	interrupts 0, underruns 33, feed 987, ready 2012 [b:0/0/0|bs:2048/512/4]
	channel flags=0x1000114c<RUNNING,TRIGGERED,NBIO,BUSY,HAS_SIZE,VIRTUAL>
	{userland} -> feeder_root(0x00200010) -> feeder_volume(0x00200010) -> feeder_rate(0x00200010 q:1 44100 -> 48000) -> {hardware}
	[pcm1:record:dsp1.r0]: spd 48000, fmt 0x00200010, flags 0x00002108, 0x00000005
	interrupts 910, overruns 0, feed 1820, hfree 3072, sfree 4095 [b:3072/1536/2|bs:4096/2048/2]
	channel flags=0x2108<TRIGGERED,BUSY,HAS_VCHAN>
	{hardware} -> feeder_root(0x00200010) -> feeder_mixer(0x00200010) -> {userland}
	pcm1:record:dsp1.r0[pcm1:virtual:dsp1.vr0]: spd 44100/48000, fmt 0x00200010, flags 0x1000115c, 0x00000029, pid 58968 (audacity)
	interrupts 0, overruns 9, feed 2719, hfree 0, sfree 2012 [b:0/0/0|bs:2048/512/4]
	channel flags=0x1000115c<RUNNING,TRIGGERED,NOTRIGGER,NBIO,BUSY,HAS_SIZE,VIRTUAL>
	{hardware} -> feeder_root(0x00200010) -> feeder_rate(0x00200010 q:1 48000 -> 44100) -> feeder_volume(0x00200010) -> {userland}
As you can see, Audacity tries to playback on pcm1 instead of pcm0. This doesn't look right to me. How can I fix it?
--
Torfinn

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

Re: Audacity tries playback to wrong device while recording

Post by steve » Fri May 06, 2011 7:31 pm

Can't you change that in the Device Toolbar? (or alternatively in "Edit menu > Preferences > Devices")
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

tingo
Posts: 9
Joined: Fri May 06, 2011 6:53 pm
Operating System: Please select

Re: Audacity tries playback to wrong device while recording

Post by tingo » Fri May 06, 2011 7:36 pm

steve wrote:Can't you change that in the Device Toolbar? (or alternatively in "Edit menu > Preferences > Devices")
I can change it, but to what?
As I wrote, the correct device is already selected in preferences -> devices:
tingo wrote:pcm0 (shown as "/dev/dsp" in Audacity preferences, devices) is the internal sound card, used for playback

bgravato
Posts: 2098
Joined: Wed Jan 13, 2010 8:56 pm
Operating System: Linux Debian

Re: Audacity tries playback to wrong device while recording

Post by bgravato » Fri May 06, 2011 11:24 pm

Let me see if I got this right... When you hit record you can successfully record what's coming in the line-in right?

After recording is done, when you hit play, you can hear the recorded track, right?

The thing is... you want to listen to what is coming in the line-in, while you are recording, but you can't. Is this what's happening?
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).

tingo
Posts: 9
Joined: Fri May 06, 2011 6:53 pm
Operating System: Please select

Re: Audacity tries playback to wrong device while recording

Post by tingo » Sat May 07, 2011 3:03 pm

bgravato wrote:Let me see if I got this right... When you hit record you can successfully record what's coming in the line-in right?
Yes.
After recording is done, when you hit play, you can hear the recorded track, right?
Yes.
The thing is... you want to listen to what is coming in the line-in, while you are recording, but you can't. Is this what's happening?
Yes.
Please also note what I wrote about using two different sound devices; pcm0 (internal sound card) and pcm1 (usb sound device) for recording. The recording device doesn't have any speakers or other means to deliver sound, so playback on that device is never going to work. In case anyone wonders, the recording device looks like this one.

bgravato
Posts: 2098
Joined: Wed Jan 13, 2010 8:56 pm
Operating System: Linux Debian

Re: Audacity tries playback to wrong device while recording

Post by bgravato » Mon May 09, 2011 12:16 pm

Sorry for the late reply. You probably need to enable software playthrough from the transport menu. Does that solve your problem?
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: 2098
Joined: Wed Jan 13, 2010 8:56 pm
Operating System: Linux Debian

Re: Audacity tries playback to wrong device while recording

Post by bgravato » Mon May 09, 2011 10:40 pm

Ok, you said on the first post that software playthrough is enabled...

I have no knowledge of how the sound system works on freebsd, but should do it... Can't think of anything else...

Does overdub work? Overdub allows to listen to one (or more) track while recording a new one. Record or import one track. Enable overdub (Transport menu). Record another track. It should play the first track while it's recording... does it?
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).

tingo
Posts: 9
Joined: Fri May 06, 2011 6:53 pm
Operating System: Please select

Re: Audacity tries playback to wrong device while recording

Post by tingo » Wed May 11, 2011 10:58 pm

bgravato wrote:Ok, you said on the first post that software playthrough is enabled...
Yes.
I have no knowledge of how the sound system works on freebsd, but should do it... Can't think of anything else...
I agree - it should work, based on the documentation, googling and whatnot. But it doesn't work. :-/
That is why I'm trying to debug this problem.
Does anyone here know portaudio?
Does overdub work? Overdub allows to listen to one (or more) track while recording a new one. Record or import one track. Enable overdub (Transport menu). Record another track. It should play the first track while it's recording... does it?
No, overdub does not work - there is no sound from an existing (previously recorded) track while recording a new track.
As before, playback has sound.

bgravato
Posts: 2098
Joined: Wed Jan 13, 2010 8:56 pm
Operating System: Linux Debian

Re: Audacity tries playback to wrong device while recording

Post by bgravato » Thu May 12, 2011 10:14 am

tingo wrote:
bgravato wrote:Does overdub work? Overdub allows to listen to one (or more) track while recording a new one. Record or import one track. Enable overdub (Transport menu). Record another track. It should play the first track while it's recording... does it?
No, overdub does not work - there is no sound from an existing (previously recorded) track while recording a new track.
As before, playback has sound.
This suggests me that the problem might be in the way freebsd accesses the sound card. Apparently when it is recording it blocks any playback.

Do you have some other app that uses the sound card? For example a media player. Try this tests:

1) Open an mp3 or wav in another app and start playing it. You get sound right? Then start recording in audacity while it is playing on the other app. Does it keeps playing on the other app? Does it record properly in audacity?

2) Try the opposite sequence: first put audacity recording. Then while it is recording start playback in the other app. Does it play?

3) Try playback only, but on audacity and the other app simultaneously. Like before try both sequences.

Meanwhile I'll try to get the attention of some of the developers to this issue.
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).

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Audacity tries playback to wrong device while recording

Post by Gale Andrews » Thu May 12, 2011 5:05 pm

Does anyone else on Linux have this issue when recording from a USB device?

Even if the inbuilt sound device wasn't full duplex (can't play and record simultaneously), it shouldn't stop you recording on the USB device and playing to the inbuilt device.

Does this USB gizmo support OS'es other than Windows?

Does the software that comes with the gizmo allow software playthrough?

It's possible you may have come across a variant of this bug:
http://bugzilla.audacityteam.org/show_bug.cgi?id=29

If you believe your inbuilt device is full duplex, has correct drivers meant for FreeBSD etc. then try disconnecting the USB gizmo and record from a mic or something else connected to the sound device. Does Audacity software playthrough or overdub work now?

Does the computer have a line-in? That is usually the best way to record cassettes unless you have a significant noise problem with the inbuilt sound device.



Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

Locked