Can only record one track

Help for Audacity on GNU/Linux.
Forum rules
ImageThis forum is for Audacity on GNU/Linux.
Please state:
  • which version of Linux you are using,
  • the exact three-section version number of Audacity from Help menu > About Audacity,
  • whether you installed your distribution's release, PPA version, or compiled Audacity from source code.

Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade (see https://www.audacityteam.org/download/).
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
Post Reply
lior
Posts: 5
Joined: Sun Mar 28, 2021 8:13 am
Operating System: Linux *buntu

Can only record one track

Post by lior » Sun Mar 28, 2021 8:26 am

Hi,

First of all, thanks for making this software.

Im using Kubuntu 20.04. I had no issues with the packaged version and everything worked fine when I built version 2.4.2 from source. Then one day when I tried to record a second track, it instantly stopped recording it and printed these errors on the console:

Code: Select all

ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
Expression 'err' failed in '/home/lior/dev/audacity-minsrc-2.4.2/lib-src/portaudio-v19/src/hostapi/alsa/pa_linux_alsa.c', line: 3355
Expression 'ContinuePoll( self, StreamDirection_In, &pollTimeout, &pollCapture )' failed in '/home/lior/dev/audacity-minsrc-2.4.2/lib-src/portaudio-v19/src/hostapi/alsa/pa_linux_alsa.c', line: 3896
Expression 'PaAlsaStream_WaitForFrames( stream, &framesAvail, &xrun )' failed in '/home/lior/dev/audacity-minsrc-2.4.2/lib-src/portaudio-v19/src/hostapi/alsa/pa_linux_alsa.c', line: 4274
If I press the record button many times it will usually work once but will fail again on the next time.
I tried downgrading back to verison 2.2 packaged in Ubuntu but it didnt help.
It also doesn't matter which input device Im trying to record (the built-in mic, a USB mic or a Zoom g5n)
Today I built version 3.0.0 from source but the issue persists, though there aren't any messages in the console.
Rebooting doesnt help either.
If I delete the first track I can always record it back but if there is an existing track it will fail.
I suspect that an upgrade to pulseaudio is the cause but Im not sure.
Also, on some rare occasions everything works fine.

Any help is appreciated.

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

Re: Can only record one track

Post by steve » Sun Mar 28, 2021 9:17 am

Check what other apps are running. There may be another app fighting for control of the sound card (voip apps are infamous for doing this, but even web browsers can cause this type of problem sometimes).
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

lior
Posts: 5
Joined: Sun Mar 28, 2021 8:13 am
Operating System: Linux *buntu

Re: Can only record one track

Post by lior » Sun Mar 28, 2021 11:44 am

I closed my browser & spotify and made sure no other app is running but it didn't help.

Setting these values in pulseaudio daemon.conf seems to make things better, it still fails but less times:

Code: Select all

default-fragments = 2
default-fragment-size-msec = 1
The problem with these settings is that is still not 100% working and also trying to play something on Youtube or Spotify sounds aweful.

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

Re: Can only record one track

Post by steve » Sun Mar 28, 2021 12:01 pm

Fwiw, this is my pulseaudio daemon.conf

Code: Select all

; daemonize = no
; fail = yes
; allow-module-loading = yes
; allow-exit = yes
; use-pid-file = yes
; system-instance = no
; local-server-type = user
; enable-shm = yes
; enable-memfd = yes
; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB
; lock-memory = no
; cpu-limit = no

; high-priority = yes
; nice-level = -11

; realtime-scheduling = yes
; realtime-priority = 5

; exit-idle-time = 20
; scache-idle-time = 20

; dl-search-path = (depends on architecture)

; load-default-script-file = yes
; default-script-file = /etc/pulse/default.pa

; log-target = auto
; log-level = notice
; log-meta = no
; log-time = no
; log-backtrace = 0

; resample-method = speex-float-1
; avoid-resampling = false
; enable-remixing = yes
; remixing-use-all-sink-channels = yes
; remixing-produce-lfe = no
; remixing-consume-lfe = no
; lfe-crossover-freq = 0

; flat-volumes = no

; rescue-streams = yes

; rlimit-fsize = -1
; rlimit-data = -1
; rlimit-stack = -1
; rlimit-core = -1
; rlimit-as = -1
; rlimit-rss = -1
; rlimit-nproc = -1
; rlimit-nofile = 256
; rlimit-memlock = -1
; rlimit-locks = -1
; rlimit-sigpending = -1
; rlimit-msgqueue = -1
; rlimit-nice = 31
; rlimit-rtprio = 9
; rlimit-rttime = 200000

; default-sample-format = s16le
; default-sample-rate = 44100
; alternate-sample-rate = 48000
; default-sample-channels = 2
; default-channel-map = front-left,front-right

; default-fragments = 4
; default-fragment-size-msec = 25

; enable-deferred-volume = yes
deferred-volume-safety-margin-usec = 1
; deferred-volume-extra-delay-usec = 0

(everything at default except:
deferred-volume-safety-margin-usec = 1)
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

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

Re: Can only record one track

Post by steve » Sun Mar 28, 2021 12:03 pm

What are you recording from?
Unless you are recording sounds playing on the computer, you can bypass Pulse by selecting the "hw" option in the Device Toolbar that corresponds with your recording device.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

lior
Posts: 5
Joined: Sun Mar 28, 2021 8:13 am
Operating System: Linux *buntu

Re: Can only record one track

Post by lior » Sun Mar 28, 2021 2:21 pm

Im recording from a Yeti USB microphone and a Zoom G5n (guitar multi-effects) connected via USB as well.
The Zoom only has a hw option and that doesnt work well for me.

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

Re: Can only record one track

Post by steve » Sun Mar 28, 2021 2:35 pm

lior wrote:
Sun Mar 28, 2021 2:21 pm
The Zoom only has a hw option and that doesnt work well for me.
Why, what's the problem?

There should be a "hw" option for the Yeti, but only if the Yeti is connected before launching Audacity, or after "Rescan Audio Devices" (in the "Transport" menu).
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

lior
Posts: 5
Joined: Sun Mar 28, 2021 8:13 am
Operating System: Linux *buntu

Re: Can only record one track

Post by lior » Sun Mar 28, 2021 2:53 pm

The problem is that only one track is being recorded.
When trying to record another one, audacity just create an empty new track and stops recording.
Tweaking the pulseaudio settings does help but doesnt fix it 100%.

Unique
Posts: 8
Joined: Sat Jul 25, 2020 12:28 pm
Operating System: Linux *buntu

Re: Can only record one track

Post by Unique » Wed Mar 31, 2021 2:27 pm

I see the same error since I installed the low latency kernel on Ubuntu 20.
The first recording track works fine the second fails as you described.
This is with an SSL2 attached.
If I use the internal sound card it works fine.

The workaround that I found was to start jack, launch Audacity and use Jack as Audio Host, Recording and Playback device.

lior
Posts: 5
Joined: Sun Mar 28, 2021 8:13 am
Operating System: Linux *buntu

Re: Can only record one track

Post by lior » Thu Apr 01, 2021 10:15 am

Unique wrote:
Wed Mar 31, 2021 2:27 pm
The workaround that I found was to start jack, launch Audacity and use Jack as Audio Host, Recording and Playback device.
Using Jack also fixes my issue, thanks!

Post Reply