Problem with Software Playthrough and Pulse

Help for Audacity 2.x.x on GNU/Linux.

ImageThis forum is for Audacity 2.x.x on GNU/Linux and Unix-like operating systems.
Please state which version of Linux you are using, the exact three-section version number of Audacity from Help > About Audacity... and whether you installed your distribution's release or daily version of Audacity 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 at 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.

Problem with Software Playthrough and Pulse

Permanent link to this post Posted by audiofile375 » Sat Nov 25, 2017 12:13 am

Greetings,
I am running Slackware Linux 14.2 (K4.4.88), Audacity 2.1.2, and Pulseaudio 9.0 with an Asus Zonar D2 audio card.
This combination was working with Slackware 14.1 without Pulseaudio. However, now I can't get the audio monitor (Software Passthrough) to work. With Software Passthrough off, It will record and I can play it back without any problems, but I cannot monitor the recording while it is being played. I am not using the "Monitor" recording option in the Pulse mixer, but it does not seem to make any difference with or without the Monitor option selected. When I start a recording or "Click to start monitoring" with Software Passthrough on, I get a fraction of a second of sound from my speakers, then Audacity stops with both level "meters" frozen at the last sample reading. If I select record with Software Passthrough on, Audacity stops recording in a fraction of a second. With Software Playthrough unchecked (off), the recording or monitoring does not freeze. I suspect it has something to do with Audacity and Pulse, but I am not sure. Is this a known problem and is there anything I can do to fix it?

Thanks.
Girvin
audiofile375
 
Posts: 7
Joined: Fri Nov 24, 2017 11:34 pm
Operating System: GNU/Linux other

Re: Problem with Software Playthrough and Pulse

Permanent link to this post Posted by steve » Sat Nov 25, 2017 2:18 am

What is it that you are trying to record, and how?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 45392
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Problem with Software Playthrough and Pulse

Permanent link to this post Posted by audiofile375 » Sat Nov 25, 2017 8:07 pm

Greetings,
Thanks for your prompt reply.
I am trying to record from old media, such as records and tapes, via the Line Input of my Asus Zonar D2 audio card.

This has worked in the past, but is now broken in some way. This morning, it was working for a few seconds, then it suddenly stopped again and has not worked since, even if I close Audacity and reopen it.. After my posting yesterday, I did some more web searching and discovered a similar thread which suggested adding the Pulse module-loopback module with pactl: "pactl load-module module-loopback". I tried it, but now I get an echo on the fraction of a second of audio with "Software Playthrough" on. So, the module actually made my problem worse, not better. With Playthrough turned off, then there is no output to my speakers, but Audacity will record continuously. In fact, there is no Audacity output channel displayed on Pulse's volume control app. So, it seems that Audacity is not opening an output channel without Playthrough turned on, but with Playthrough turned on, Audacity plays a fraction of a second of audio to the output and then stops recording or monitoring, with the level meters showing the last sample.

Now, with the "Monitor" version of Pulse's D2 "Recording" device, I get nothing. That may be an artifact of the loopback module, because yesterday, without the module, the Monitor and non-Monitor devices produced the same results.

I think the main issue here is that Audacity stops after a fraction of a second of audio recording with Software Passthrough turned on, I don't think that is the way it is supposed to work, but I have no clue why it is doing this.

BTW: I compiled my Audacity from source.
I see there is a new 2.2.0 version available. As a rule, I do not normally install any software that ends in 0, but in this case I will make an exception to see if this problem has been fixed.

I have seen in other postings that the "Help > Audio Device Info" output file has been uploaded, so I am going to try to do that with my deviceinfo.txt file in case that helps.

Thanks.
Girvin
Attachments
deviceinfo.txt
(1.85 KiB) Downloaded 8 times
audiofile375
 
Posts: 7
Joined: Fri Nov 24, 2017 11:34 pm
Operating System: GNU/Linux other

Re: Problem with Software Playthrough and Pulse

Permanent link to this post Posted by audiofile375 » Sat Nov 25, 2017 10:10 pm

Update.
I compiled and tried Audacity 2.2.0 but got the same results as 2.1.2. The problem with Software Passthrough is still there.
Girvin
audiofile375
 
Posts: 7
Joined: Fri Nov 24, 2017 11:34 pm
Operating System: GNU/Linux other

Re: Problem with Software Playthrough and Pulse

Permanent link to this post Posted by steve » Sun Nov 26, 2017 3:01 pm

I don't think this is directly related to your issue, but for information...

audiofile375 wrote:As a rule, I do not normally install any software that ends in 0

Naming conventions vary. In Audacity, the three part version number is:
Series (Currently "2") . Major . Minor
Series 2 is pretty much a complete rewrite from series 1 (Series 1 has been obsolete for a long time now).
The "Major" release number increments for major updates and milestones.
The "Minor" release number increments for all other releases. There is no special significance to specific numbers.
Any other versions (nightly builds, alpha / beta versions, release candidates) are clearly named to indicate what they are, and are not classed as "releases".

"Audacity 2.2.1 RC1" is now available, and is a release candidate for the Audacity 2.2.1 release. A release candidate is a pre-release build that provides an opportunity for users to report problems before the new version is released. If no serious problems are reported, then the release candidate is renamed, and released with no other changes. If any significant problems are reported, then there is the opportunity for the developers to fix the problem and make a new release candidate.

Audacity 2.2.1 RC1 has several important bug fixes, (especially for the "Chains" feature), so I'd recommend updating as soon as convenient. If there is no RC2, then you can continue to use RC1 because it will be identical to the 2.2.1 release (or update to 2.2.1 if you prefer).
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 45392
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Problem with Software Playthrough and Pulse

Permanent link to this post Posted by steve » Sun Nov 26, 2017 3:13 pm

audiofile375 wrote:I have seen in other postings that the "Help > Audio Device Info" output file has been uploaded, so I am going to try to do that with my deviceinfo.txt file in case that helps.

Thanks. I was about to ask for that :)

It appears that the only real (hardware) audio device available to Audacity is:
Device name: HDA ATI HDMI: 0 (hw:1,3)

There is no sign of your Asus Zonar D2.
What output do you get from the command:
Code: Select all
aplay -l
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 45392
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Problem with Software Playthrough and Pulse

Permanent link to this post Posted by audiofile375 » Sun Nov 26, 2017 10:04 pm

Steve,
Thanks for the Audacity versioning tutorial. Yes, the Audacity versioning system is a bit different than most. I am accustomed to the system: Major.Minor.Bug-fixes or: Major.Minor.Security-fixes.Bug-fixes. So, a "0" digit in the last (right-most) digit is a red flag that there are bugs in the version and I stay clear of them if at all possible. As I already posted in my last update that I did download version 2.2.0, compiled and installed it, but it did not fix my problem.

Yes, I was concerned about the D2 not being listed in the deviceinfo file, especially in the device selection list. My Audacity device selection list only has "pulse" and "default" listed and also the HDMI device in the playback list. Also, there is no listing in the deviceinfo for the recording or playback sections. It seems Audacity isn't attached to the D2. The HDMA device comes from my graphics card, which I do not use (the HDMI port, I do use the graphics). In my system, ALSA had been setting this device as default at boot, so I added an "/etc/modprobe.d/alsa-base.conf" file which changes the default sound card 0 to the D2 and the HDMI "card" to card 1. There is also a noisy motherboard sound chip, but I have that disabled in the BIOS so ALSA does not even find it. I am enclosing the output of "aplay -l" as well as copies of my "/etc/asound.conf" and "/etc/modprobe.d/alsa-base.conf".

Since my last posting, I also discovered a freedesktop.org document called PulseAudio - The Perfect Setup, which has some instructions for PulseAudio setup.
https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/PerfectSetup/#Audacity
This document is dated Feb 9, 2016, so it is fairly recent. The document has sections for applications and includes Audacity. The section says that Audacity works with Pulse, but they mention a PulseAudio patch to make it work. Here is another excerpt:

Audacity doesn't support PulseAudio, nor Esound for the moment. You'll have to kill or suspend pulseaudio before you use this application. Audacity uses the PortAudio cross-platform Audio API which doesnt support pulseaudio. Some work was started on making portaudio support PulseAudio but this does not appear to be under active development currently and does not work in it's current state.


This seems to conflict with what I am reading on the Audacity website, which endorses PulseAudio. And:
Using pasuspender to momentarily suspend pulseaudio is another way to use Audacity.

Code: Select all
pasuspender -- audacity <argument>

Which may be a possibility.

HTH.
Girvin
Attachments
aplay-l.txt
(352 Bytes) Downloaded 6 times
asound.conf.txt
(105 Bytes) Downloaded 7 times
alsa-base.conf.txt
(772 Bytes) Downloaded 12 times
audiofile375
 
Posts: 7
Joined: Fri Nov 24, 2017 11:34 pm
Operating System: GNU/Linux other

Re: Problem with Software Playthrough and Pulse

Permanent link to this post Posted by steve » Mon Nov 27, 2017 9:48 am

audiofile375 wrote:I also discovered a freedesktop.org document called PulseAudio - The Perfect Setup, which has some instructions for PulseAudio setup.

That information is mostly correct but also rather dated. Most of it was copied from the old website in 2013 and has only had a handful of minor updates since.

audiofile375 wrote:Audacity doesn't support PulseAudio, nor Esound for the moment. You'll have to kill or suspend pulseaudio before you use this application. Audacity uses the PortAudio cross-platform Audio API which doesnt support pulseaudio. Some work was started on making portaudio support PulseAudio but this does not appear to be under active development currently and does not work in it's current state

That is incorrect and I suspect was written much earlier than 2013. Portaudio (hence Audacity) has fully supported PulseAudio for many years. If you have a fully working PulseAudio system, then Audacity can use it.

audiofile375 wrote:
Code: Select all
pasuspender -- audacity <argument>

That's an old workaround that dates back to the early days of PulseAudio on Ubuntu. Ubuntu was an early adopter of PulseAudio (some would say "too early"), and it took them a while to get it working properly. "pasuspender -- audacity" was a workaround for broken PulseAudio set-ups. It 'may' work for you, but be aware that it is just working around a broken sound system.


If you look in the "Input Devices" and "Output Devices" tabs of PulseAudio Volume Control (pavucontrol), is your Xonar listed?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 45392
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Problem with Software Playthrough and Pulse

Permanent link to this post Posted by audiofile375 » Mon Nov 27, 2017 6:57 pm

Steve,
If you look in the "Input Devices" and "Output Devices" tabs of PulseAudio Volume Control (pavucontrol), is your Xonar listed?

Yes, it is:
Code: Select all
CMI8788 [Oxygen HD Audio] (Virtuoso 200 (Xonar D2)) Analog Stereo

In the "Configuration" tab, I have set it to "Analog Stereo Duplex", which seems the best option of many for my configuration and use.

Ah-Ha!!
I just ran Audacity 2.2.0 from an xterm to see if there were any Audacity error messages spit out and I got a lot. I am attaching the text of the output. The last 3 messages starting with "Expression..." were generated when the monitoring failed in less than a second of playing.
So, it looks like there is some sort of compile problem. Keep in mind that there were no fatal build errors when I compiled Audacity. There were many warnings, mostly about unused variables, but nothing fatal. In case it may help, here is my configure argument list:
--enable-unicode --enable-nyquist --with-expat=system \
--with-libvorbis=system --with-libmad=system --with-libflac=system \
--with-libsndfile=system --with-libid3tag=system --with-libsoxr \
--with-portaudio \
--with-ladspa --with-ffmpeg=system --with-soundtouch=system \
--with-libtwolame=system --with-libvamp=system \
--without-libresample --without-libsamplerate --without-lv2

Thanks.
Girvin
Attachments
console-errors.txt
(4.34 KiB) Downloaded 7 times
audiofile375
 
Posts: 7
Joined: Fri Nov 24, 2017 11:34 pm
Operating System: GNU/Linux other

Re: Problem with Software Playthrough and Pulse

Permanent link to this post Posted by steve » Mon Nov 27, 2017 8:56 pm

audiofile375 wrote:here is my configure argument list:
--enable-unicode --enable-nyquist --with-expat=system \
--with-libvorbis=system --with-libmad=system --with-libflac=system \
--with-libsndfile=system --with-libid3tag=system --with-libsoxr \
--with-portaudio \
--with-ladspa --with-ffmpeg=system --with-soundtouch=system \
--with-libtwolame=system --with-libvamp=system \
--without-libresample --without-libsamplerate --without-lv2

Wow, that's a lot. I just use:
Code: Select all
../configure --with-lib-preference="local system" --with-ffmpeg="system" --disable-dynamic-loading --enable-debug

or
Code: Select all
../configure --with-lib-preference="local system" --with-ffmpeg="system" --disable-dynamic-loading

depending on whether I'm installing for production use, or building for development / testing.
If I don't use the local (included in the Audacity source) version of PortAudio, I get a build error. This is because the developers had to modify the PortAudio library so that PortMidi would work correctly. I can't see whether you are building with a local or system version of PortAudio, but for Audacity 2.2.0 it needs to be the local version.


From the console messages, this part looks suspicious:
Code: Select all
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.AV200.pcm.hdmi.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4292:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4771:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM hdmi
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.AV200.pcm.hdmi.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4292:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4771:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM hdmi
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.AV200.pcm.modem.0:CARD=0'
ALSA lib conf.c:4292:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4771:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline:CARD=0,DEV=0
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.AV200.pcm.modem.0:CARD=0'
ALSA lib conf.c:4292:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4771:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline:CARD=0,DEV=0
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.AV200.pcm.modem.0:CARD=0'
ALSA lib conf.c:4292:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4771:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM phoneline
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.AV200.pcm.modem.0:CARD=0'
ALSA lib conf.c:4292:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4771:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM phoneline
ALSA lib pcm_dmix.c:1030:(snd_pcm_dmix_open) unable to open slave

I think those references to "AV200" are your Asus Xonar not working, but other than that I don't know what they mean.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 45392
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Next

Return to GNU/Linux and Unix-like



Who is online

Users browsing this forum: No registered users and 2 guests