Subject: Re: got a handle on it: nas enabled mpg123 sounds slow and scratchy?
To: Jon Trulson <jon@radscan.com>
From: Frederick Bruckman <fredb@immanent.net>
List: netbsd-help
Date: 03/05/2003 08:19:42
On Tue, 4 Mar 2003, Jon Trulson wrote:
> On Tue, 4 Mar 2003, Scott Presnell wrote:
>
> > blocksize sets the current audio blocksize. The generic audio
> > driver layer and the hardware driver have the opportunity to ad-
> > just this block size to get it within implementation-required
> > limits. Upon return from an AUDIO_SETINFO call, the actual
> > blocksize set is returned in this field. Normally the blocksize
> > is calculated to correspond to 50ms of sound and it is recalcu-
> > lated when the encoding parameter changes, but if the blocksize
> > is set explicitely this value becomes sticky, i.e., it is remains
> > even when the encoding is changed. The stickyness can be cleared
> > by reopening the device or setting the blocksize to 0.
>
> AUDIO_SETINFO only appears to be used when dealing with a pc
> speaker in auvoxware... Perhaps this needs to be used (or at least
> intialized to blocksize 0) on device open (before specifying format/sample
> rate) for netbsd? Might be worth trying in the device open code...
On NetBSD OSS-audio is just a library that translates the OSS ioctl's
into native ones. The blocksize, for example, is rounded off to a
power of two and then set the ordinary way, because applications using
OSS expect that the blocksize must be a power of two. The audio layer
(which is itself an abstraction of the actual sound drivers) is more
flexible than OSS, so a native driver would possibly perform better,
and never worse.
Frederick