[linux-audio-dev] alsa, oss , efficiency?

Paul Davis paul at linuxaudiosystems.com
Thu Nov 2 20:09:56 UTC 2006

On Thu, 2006-11-02 at 20:58 +0100, Jens M Andreasen wrote:
> On Thu, 2006-11-02 at 10:33 +0100, lemmel wrote:
> Lots of people have been wondering, but this is the meat I think:
> > > > and even randomly truncated,
> The difference in behaviour /might/ arise from differences in philosophy
> of closing the device at end of file. Should we shut up now! Or wait
> untill the buffer is empty ... The buffer could be incredibly huge, not
> least because Linux-audio traditionally do not have RT capabilities, so
> waiting for that has the potential to be very annoying. OTOH, our man is
> not getting his signal through (which is also annoying )

very good point, the relevant call here is "snd_pcm_drain()". ALSA
allows you to close the device immediately (i.e. when you call
snd_pcm_close()), or when all data sent to the device has been played.
OSS doesn't provide an automatic way to select these behaviours, and I
recall from memory that you always get the second one.

which of these behaviours is correct is a very app-dependent issue.

More information about the Linux-audio-dev mailing list