Subject: Re: Audio encodings
To: None <current-users@NetBSD.ORG>
From: Mike Long <email@example.com>
Date: 10/11/1997 22:45:01
>Date: Sun, 12 Oct 1997 03:19:36 +0200 (MET DST)
>From: Lennart Augustsson <firstname.lastname@example.org>
[William Ferry wrote:]
>> According to ktrace and such, this is where the error is occurring.
>> Looking at <sys/audioio.h>, I see that the above incoding is "obsolete".
>> What can / should I set the encoding to for this to work? The program
>> seems to output in 16-bit PCM headerless data format, and it sounds like
>> that encoding would be right had it not been obsoleted. Was it replaced
>> with something else, or simply removed? I'd greatly appreciate any
>> suggestions. Thanks in advance.
>The encoding you want is AUDIO_ENCODING_SLINEAR, i.e. signed
>linear. The reason AUDIO_ENCODING_LINEAR was obsoleted was that
>it didn't say anything about signed/unsigned (and in fact behaved
>differently with 8 and 16 bits).
>If you compile your kernel with COMPAT_12 it should still
>accept AUDIO_ENCODING_LINEAR, though.
I think that behavior should be made independent of COMPAT_12, for
exactly the reason demonstrated here: code written to work with Sun's
/dev/audio should Just Work with as few changes as possible.
Mike Long <email@example.com> http://www.shore.net/~mikel
"Every normal man must be tempted at times to spit on his hands,
hoist the black flag, and begin slitting throats." -- H.L. Mencken