Using Software Playthrough interferes with 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.
Locked
BarrySamuels
Posts: 6
Joined: Mon Sep 17, 2007 3:30 pm
Operating System: Please select

Using Software Playthrough interferes with recording

Post by BarrySamuels » Sun Mar 09, 2008 12:37 pm

Debian Tesing with kernel 2.6.23
Audacity 1.3.4
On-board Intel 82801G (ICH7)
Ion USB turntable

If I record from the above turntable with the Software Playthrough off there are no problems and I get a good recording. :D

If I turn the Playthrough on all I get is a sharp burst of sound which lasts for only a fraction of a second and at irregular intervals. If I play this back it sounds like a continuous tone. :(

I also have artsd running but stopping that makes no difference.
Barry Samuels
http://www.beenthere-donethat.org.uk
The Unofficial Guide to Great Britain

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

Re: Using Software Playthrough interferes with recording

Post by steve » Sun Mar 09, 2008 4:59 pm

Turn of software playthrough (it is off by default)

So that you can hear your records while you are recording, the ION TT is equipped with "phono" outputs that can be plugged into an amplifier (phono input), just like a conventional turntable.

The ION turntable does not provide the means to monitor the USB digital signal (one of the ways that they've kept the price so low).
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

BarrySamuels
Posts: 6
Joined: Mon Sep 17, 2007 3:30 pm
Operating System: Please select

Re: Using Software Playthrough interferes with recording

Post by BarrySamuels » Sun Mar 09, 2008 5:33 pm

Yes I said in my post that if I turned off Software Playthrough recording then works.

However in an older version of Audacity (1.2.4) using OSS I could use playthrough whilst recording without problems. I'd like to be able to do the same with this version.
Barry Samuels
http://www.beenthere-donethat.org.uk
The Unofficial Guide to Great Britain

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

Re: Using Software Playthrough interferes with recording

Post by steve » Mon Mar 10, 2008 6:49 pm

"Software Playthrough" has always been a bit of a clunky work-around on any platform, and more so on a standard Linux install. I'm quite surprised that you ever got it working properly.

The reason that software playthrough is provided is for situations just like yours, where the audio input device is unable to do hardware playthrough. The reason that it has always been a bit clunky is because of the extra work that the computer has to do in sending the data back out at the same time as recording.

The reason that it is particularly clunky on a standard Linux installation is that Linux gives rather low priority to audio, unless you are using an optimised kernel (low-latency or real-time kernel). To make things even worse, the ALSA USB driver is (at least on my computer) a lot slower than the PCI sound-card ALSA driver. Also, software playthrough seems to be slower if you are outputting the audio to a different device to the one that is the recording source.

Out of interest I had a go on my machine, which is admittedly rather ancient and low spec.
Using OSS for playback was just a "no go" - it ran for a couple of seconds then crashed (processor usage was completely maxed out).
Using "ALSA USB" for recording and "ALSA SBLive" for playback, I could just about get it to work, but with occasional glitches every time CPU usage hit 100%.

The data from the USB input can not be cached, as this would cause huge problems for anyone doing multi-track recording as the latency would go through the roof, therefore it is essential that the input data can get from the analogue input, through the A/D converter, through the USB interface, into Audacity, and down onto the hard drive, consistently in real time. Even the slightest interruption to this will cause an audible glitch or drop-out.

If you look at the specifications of more expensive USB audio devices, you will notice that they have very fast USB ports. This is to ensure that at least the first part of the signal path is fast enough and reliable enough. Once it gets to the USB port on the PC however, there can still be problems if there are any bottlenecks (but that's not the audio device manufacturers problem). You will also notice that most of the more pricey USB audio cards advertise "low latency" or even "zero latency" monitoring - this is precisely to avoid problems inherent with software playthrough. (Pro audio gear does not use USB at all - firewire, ADAT, PCI, or some other interface is used instead)

Anyway, back to "USB in / Sound card out" - with a bit of tweaking I could get it to work with a single audio channel (mono). My PC is very old (Pentium III 500 MHz) and the "bottleneck" for me was CPU load. I guess that your computer is higher spec. so you will hopefully be able to get it to work with stereo, but it's certainly worth checking what your CPU usage is while recording. One of the main problems with USB for audio is that throughput depends on the availability of your processor. If the processor hits 100% even for a moment, the USB interface effectively stops and the audio will be interrupted.

Some of the optimisations that I used to get it working (in mono):
* Start with a fresh boot, and check that there are no non-essential processes running.
* Disable the meters. I checked the recording level before I started to record, by clicking on the meter, but once set, I disabled both meters.
* Turn off "Play tracks while recording new one" - this made a modest improvement in performance, and since I was only wanting to record one track I could safely turn this off.
* Generate silence on a track that is longer than the recording will be, then zoom out to the whole track before starting the recording - this prevents the screen from scrolling and thus reduces the CPU load a little.
* Try different sample rates and bit depths - Lower sample rates and bit depths will put through less data, but in some cases the audio device may have a specific setting that it works best with. For myself there was little difference between 44.1/16 - 48/16 - 44.1/24 or 48/24, but by a slim margin 44.1/16 seemed to be a little better.
* For Windows users, turning off Anti-virus software and de-fragging the hard drive can make considerable improvements, but not really applicable on Linux.

Personally I'd like to see Audacity working with JACK, but unfortunately JACK support is very poor in Audacity at present.

If all else fails, you could go back to an old version, but you would probably have to build it from source. Old versions are available here: http://sourceforge.net/project/showfile ... up_id=6235
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

BarrySamuels
Posts: 6
Joined: Mon Sep 17, 2007 3:30 pm
Operating System: Please select

Re: Using Software Playthrough interferes with recording

Post by BarrySamuels » Mon Mar 10, 2008 7:52 pm

Steve

Many thanks for that huge amount of information - it must have taken you the whole weekend to write. :D

When I tried previously it was on this machine (Dual Core 2.13 GHz) and I made a number of recordings without any problems.

I'll have to experiment a bit more. :shock:
Barry Samuels
http://www.beenthere-donethat.org.uk
The Unofficial Guide to Great Britain

BarrySamuels
Posts: 6
Joined: Mon Sep 17, 2007 3:30 pm
Operating System: Please select

Re: Using Software Playthrough interferes with recording

Post by BarrySamuels » Wed Mar 12, 2008 9:48 am

I've done a few tests and observed the following:

1. When recording from the USB turntable there is no discernible CPU activity (I have two CPU activity monitors - one for each core) either with or without playthrough enabled.

2. If I load the Alsa OSS modules UDEV creates /dev/dsp, /dev/dsp1 and /dev/dsp2 but Audacity lists only /dev/dsp in the device drop-down so I can't try recording. Playback uses /dev/dsp and recording uses /dev/dsp1.

When I had success before using Playthrough whilst recording I was using the OSS sound system and not Alsa OSS modules. The old OSS system gave perfect results when using playthrough but I can't use that now as I have other applications that use Alsa.

It would seem that there is a problem with Audacity somewhere.
Barry Samuels
http://www.beenthere-donethat.org.uk
The Unofficial Guide to Great Britain

horseman
Posts: 2
Joined: Tue Aug 18, 2009 12:44 am
Operating System: Please select

Re: Using Software Playthrough interferes with recording

Post by horseman » Tue Aug 18, 2009 12:49 am

I would REALLY like to see this issue fixed as well. I got a brand new turntable and while it works perfectly in the windows' audacity version, it doesn't in linux. I get the same symptoms when using the playthrough feature and I've even opened a bug. https://bugs.launchpad.net/ubuntu/+sour ... bug/411749

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

Re: Using Software Playthrough interferes with recording

Post by steve » Fri Aug 28, 2009 1:47 am

horseman wrote:I got a brand new turntable
Is that a USB turntable?
Why exactly do you need to use software playthrough?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

horseman
Posts: 2
Joined: Tue Aug 18, 2009 12:44 am
Operating System: Please select

Re: Using Software Playthrough interferes with recording

Post by horseman » Fri Aug 28, 2009 1:57 am

To listen to records without recording. I went ahead and hooked the turntable up with RCA because there is no practical option for USB turntables in linux.

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

Re: Using Software Playthrough interferes with recording

Post by steve » Fri Aug 28, 2009 2:22 am

If your turntable is hooked up to your computer sound card via the RCA leads, then software playthrough should be off.

Most Linux distros should be able to record from USB audio devices, (using ALSA USB audio codec), but if you have a reasonable sound card then using the RCA connectors to your sound card may indeed be a more reliable way to go.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Locked