Discussion:
audacity crashes recording
(too old to reply)
Russell L. Carter
2014-07-09 23:52:46 UTC
Permalink
Greetings,
I have built audio/audacity with the following options:

OPTIONS_FILE_UNSET+=DEBUG
OPTIONS_FILE_SET+=DOCS
OPTIONS_FILE_SET+=FFMPEG
OPTIONS_FILE_SET+=FLAC
OPTIONS_FILE_SET+=ID3TAG
OPTIONS_FILE_SET+=LADSPA
OPTIONS_FILE_UNSET+=LAME
OPTIONS_FILE_SET+=MAD
OPTIONS_FILE_SET+=MIDI
OPTIONS_FILE_SET+=NYQUIST
OPTIONS_FILE_SET+=PORTMIXER
OPTIONS_FILE_SET+=SBSMS
OPTIONS_FILE_SET+=SOUNDTOUCH
OPTIONS_FILE_SET+=TWOLAME
OPTIONS_FILE_SET+=VAMP
OPTIONS_FILE_SET+=VORBIS
OPTIONS_FILE_UNSET+=RESAMPLE
OPTIONS_FILE_UNSET+=SAMPLERATE
OPTIONS_FILE_SET+=SOXR

I've tried hard to eliminate any dependencies on pulseaudio
or alsa (in ffmpeg, for instance).

I've got a Behringer U202 attached to a turntable for
input. Choosing OSS, it detects the devices as /dev/dsp,
/dev/dsp, with 2 (Stereo) input. When I click "monitor"
in the microphone dropdown, I get a crash with the
complaint:

ALSA lib confmisc.c:768:(parse_card) cannot find card '0'

Anybody got audacity working with OSS? Possibly with
snd_uaudio?

Thanks,
Russell
Hans Petter Selasky
2014-07-10 00:11:31 UTC
Permalink
Post by Russell L. Carter
Greetings,
OPTIONS_FILE_UNSET+=DEBUG
OPTIONS_FILE_SET+=DOCS
OPTIONS_FILE_SET+=FFMPEG
OPTIONS_FILE_SET+=FLAC
OPTIONS_FILE_SET+=ID3TAG
OPTIONS_FILE_SET+=LADSPA
OPTIONS_FILE_UNSET+=LAME
OPTIONS_FILE_SET+=MAD
OPTIONS_FILE_SET+=MIDI
OPTIONS_FILE_SET+=NYQUIST
OPTIONS_FILE_SET+=PORTMIXER
OPTIONS_FILE_SET+=SBSMS
OPTIONS_FILE_SET+=SOUNDTOUCH
OPTIONS_FILE_SET+=TWOLAME
OPTIONS_FILE_SET+=VAMP
OPTIONS_FILE_SET+=VORBIS
OPTIONS_FILE_UNSET+=RESAMPLE
OPTIONS_FILE_UNSET+=SAMPLERATE
OPTIONS_FILE_SET+=SOXR
I've tried hard to eliminate any dependencies on pulseaudio
or alsa (in ffmpeg, for instance).
I've got a Behringer U202 attached to a turntable for
input. Choosing OSS, it detects the devices as /dev/dsp,
/dev/dsp, with 2 (Stereo) input. When I click "monitor"
in the microphone dropdown, I get a crash with the
ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
Anybody got audacity working with OSS? Possibly with
snd_uaudio?
Yes, it works, but you need to compile it with possibly another audio
backend.

--HPS
Russell L. Carter
2014-07-10 00:48:19 UTC
Permalink
Post by Hans Petter Selasky
Post by Russell L. Carter
Anybody got audacity working with OSS? Possibly with
snd_uaudio?
Yes, it works, but you need to compile it with possibly another audio
backend.
Ok thanks, good to know. Which audio backend works? I am 14 years
away from FreeBSD and getting up to speed. All of the research I
have done today points to native "OSS" as being The Right Way, and
alsa and pulseaudio are to be avoided. Is this not true? What is
the right way?

I frankly don't care which one works, no dog in that fight.

Best,
Russell
Post by Hans Petter Selasky
--HPS
Hans Petter Selasky
2014-07-10 06:47:03 UTC
Permalink
Post by Russell L. Carter
Post by Hans Petter Selasky
Post by Russell L. Carter
Anybody got audacity working with OSS? Possibly with
snd_uaudio?
Yes, it works, but you need to compile it with possibly another audio
backend.
Ok thanks, good to know. Which audio backend works? I am 14 years
away from FreeBSD and getting up to speed. All of the research I
have done today points to native "OSS" as being The Right Way, and
alsa and pulseaudio are to be avoided. Is this not true? What is
the right way?
I frankly don't care which one works, no dog in that fight.
Hi,

My Audacity is using portaudio, and that seems to work.

--HPS
Russell L. Carter
2014-07-16 18:32:30 UTC
Permalink
Post by Hans Petter Selasky
Post by Russell L. Carter
Anybody got audacity working with OSS? Possibly with
snd_uaudio?
Yes, it works, but you need to compile it with possibly another audio
backend.
I got a reply off-list of "My Audacity is using portaudio, and that
seems to work."

So I did some digging, and for the benefit of others who do not
already know the last 20 years of sound subsystems history, here is
what I have found so far (probably some mistakes; I'd appreciate
corrections).

First, there are two different OSS implementations:

1. audio/oss: opensound.com OSS, currently at version 4.2. I got OSS
v4.2 loaded but it doesn't see my USB sound device.

2. Native FreeBSD OSS, which is apparently a complete rewrite of
opensound.com OSS v3, documented in
http://www.opensound.com/pguide/oss.pdf. In what follows, I'm
going to label native FreeBSD OSS "OSS-FreeBSD".

My USB device is
uaudio0: <Burr-Brown from TI USB Audio CODEC, class 0/0, rev
1.10/1.00, addr 9>
Sound output works great on OSS-FreeBSD.

# cat /dev/sndstat
Installed devices:
pcm0: <USB audio> (play/rec) default

There are two portaudio ports:

1. audio/portaudio, which is actually portaudio 1.8, and apparently has
support for OSS-FreeBSD. It has no support for alsa.

2. audio/portaudio2 which is actually portaudio 1.9, and apparently has
no support for OSS-FreeBSD. It does have robust support for alsa.

Now audio/audacity also includes portaudio 1.9, which is always
enabled. So, first tip, don't bother with installing either of the
audio/portaudio ports to support audacity.

So apparently I need to get alsa working. Alsa has a plugin,
installed by audio/alsa-plugins: libasound_module_pcm_oss.so. This
enables alsa to talk to OSS-FreeBSD. (I am guessing)

So audacity is going to talk to our sound devices by traversing the
following compatibility layers:

audacity <-> portaudio-1.9 <-> alsa <-> OSS-FreeBSD <-> sound device

Seems suboptimal, but heh. If it works, great!

However, audacity doesn't see my recording device, and indeed

# arecord -l
arecord: device_list:279: no soundcards found...

# arecord -L
null
Discard all samples (playback) or generate zero samples (capture)

My /usr/local/etc/asound.conf is copied from the distribution version
of asound.conf.sample installed by audio/alsa-lib. I haven't got google
to cough up any examples of modifying it, though it's not clear that
it's the problem. My sound device is /dev/dsp0.0.

Any ideas on how to get alsa to recognize the rec device?

Thanks,
Russell

Loading...