Subject: Re: PCM8 vs. PCM16/LINEAR?
To: Mike Long <mike.long@analog.com>
From: John Brezak <brezak@apollo.hp.com>
List: tech-kern
Date: 08/06/1995 00:28:47
> 
> >Date: Fri, 04 Aug 1995 18:26:05 -0400
> >From: John Brezak <brezak@apollo.hp.com>
> 
> >The strings are there for the use by audio independent mixer apps. The inten
t
> >was to allow the app to get all of the information from the system as to
> >the audio paths and controls.
> >
> >What could be done is to use id's for well known devices and reserve a value
> >for "custom". The custom value will have a string name supplied by the drive
r.
> 
> That sounds reasonable.  Now all we need to do is decide which devices
> (encodings, etc.) are "well known."  :-/
> 
> Sun's audio_prinfo_t includes a bitfield called 'avail_ports'.  They
> define the symbols AUDIO_SPEAKER, AUDIO_HEADPHONE, and AUDIO_LINE_OUT
> for output ports; and AUDIO_MICROPHONE and AUDIO_LINE_IN for input
> ports.  We could do something similar, and add something like
> AUDIO_OTHER so that apps can use another ioctl to get string(s).
Look at VoxWare for even more.

> 
> I've looked at the NAS (network audio system; see
> ftp://ftp.x.org/contrib/audio/nas/) and it looks like the audio system
> in Solaris works slightly differently from the one in SunOS 4.1.  I
> don't have access to any Solaris boxes, so I'd appreciate it if
> someone who does could send me some info (especially Solaris' audio.4
> and audioio.h).

You might also look at AF (Dec's audio server).

> 
> I hope people don't think I'm obsessed with Sun compatibility; but I
> think that compatibility will save us grief later.  Also, the time to
> nail all this stuff down is now, before someone writes another audio
> app for which they won't provide sources (like vat).

I use the Linux vat with no problems...

True. But Sun really didn't get things right. They work ok for the limited
audio capabilities of their workstations, but the PC audio cards today
are way beyond that. In the NetBSD mixer design, there was a alot of thought
put in for flexability and capability for compat. I think it has both. I
looked at many mixers, and thought that the Windows one really had the
most flexability. The Sun one, well it was for a Sun.

One other source base to look at is VoxWare. There are probably more
audio apps based on this these days.

Actually if you leave the name blank in the audio_mixer_name_t struct
and use the msg_id for the device id, the interface may work fine as is.
If the device specifies a name, then use it - otherwise use the msg_id.

The msg_id was intended for an index into a msgcat so that the name
can be internationalized. I never got around to doing that. And this
use of it wouldn't preclude using it for this in the future.




=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 John Brezak                    Internet: brezak@ch.hp.com
 Hewlett Packard/Apollo         Phone:    (508) 436-4915
 300 Apollo Drive               Fax:      (508) 436-5140
 Chelmsford, Massachusetts, USA