Subject: Re: audio sound on playback: require user to 'catch up'?
To: John Kohl <jtk@atria.com>
From: Brett Lymn <blymn@awadi.com.AU>
List: tech-kern
Date: 02/13/1996 12:07:47
According to John Kohl:
>
>This seems like a good time to inquire as to whether the original
>behavior was intended, and also to inquire whether the "catch up
>required" behavior should be a supported output mode.  (I believe the
>current behavior--play all samples--should be a supported output mode.)
>

>From what I could see in digging in the audio.c it certainly looked
like the behaviour was intended (at least that is what it says in the
comments).

Also, I think that the behaviour should stay.  If you just played all
the sounds given and did not insert silence when the device is still
open the device would work correctly for "cat sound.au > /dev/audio"
but what happens if you do something like:

open audio_dev
while (not quit) {
  read command
  process sound data from command
  write sound data to audio_dev
}
close audio_dev

If the code cannot or does not (depends on the rate the commands come
through) keep up with the audio device then you are going to have gaps
in the data.  If the driver does not keep feeding silence then you
will get pops and clicks on the output due to the sound data stopping
and starting.  Sure the application can do the silence fill but that
does complicate the above example with non-blocking reads and selects.

-- 
Brett Lymn, Computer Systems Administrator, AWA Defence Industries
===============================================================================
  "Upgrading your memory gives you MORE RAM!" - ad in MacWAREHOUSE catalogue.