Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Using the audio(4) driver for recording under -current?



# It's not a main topic but a correction.

At Thu, 27 Oct 2022 10:12:32 +0000,
nia wrote:
> > #set up the audio device first
> > audioctl -d /dev/sound2 -w record.rate=44100 record.channels=2 record.precision=16 \
> >  record.encoding=slinear_le
:
> > Then, to record:
> > cat /dev/sound2 > rawrecordingfile
> 
> There are some quirks of /dev/sound that might cause problems,
> for example it has "sticky" pause state.

If you care about the sticky pause, you can control it,
specifying -w record.pause=0 for audioctl:

 % audioctl -d /dev/sound2 -w record.pause=0

(But as everyone says, audiorecord(1) is recommended.)

> I'd recommend using
> audiorecord(1) with /dev/audio instead just to get more
> consistent results. The man page has a nice predictable 
> example to record CD quality audio:
> 
> $ audiorecord -c 2 -e slinear_le -P 16 -s 44100 recording.wav

audiorecord(1) uses /dev/sound by default.  So it's also affected by
the sticky pause.  It's better to specify -d /dev/audioX explicitly:

 % audiorecord -d /dev/audioX \
    -c 2 -e slinear_le -P 16 -s 44100 recording.wav

Thanks,
---
Tetsuya Isaki <isaki%pastel-flower.jp@localhost / isaki%NetBSD.org@localhost>



Home | Main Index | Thread Index | Old Index