Subject: Re: audio{record|play}: why audioctl device?
To: Jaromir Dolecek <jdolecek@netbsd.org>
From: Lennart Augustsson <lennart@augustsson.net>
List: tech-userlevel
Date: 01/24/2002 22:05:01
Jaromir Dolecek wrote:

> Hi,
> I've been using audiorecord and audioplay with audio1.
> I've bumped into fact that the program sets the device parameters
> via audioctl device, and thus one needs to call the program like
> 'audioplay -d /dev/audio1 -C /dev/audioctl1 foo.au'.
> This is, well, quite inconvenient.

Do you really (normally) need both of them?


> I've started to implement some code to try to "guess" the appropriate
> audioctl device for give audio device.

Guessing it isn't hard.:-)


> Hoever, I realized it seems
> there is actually no need for this. All the ioctls can be done with
> audio device directly.

You can only open the audio device if it isn't already open.  So if you're
already playing something and need to change some parameter you're
stuck without audioctl.  This doesn't happen very often, and, in fact,
audioctl was introduced much later than audio&sound&mixer.  It was
mostly introduced to be sun compatible.

    -- Lennart