If you're allowing applications to play audio data, then unless you
have a very cunning mixer daemon, you're trusting them not to drown
each other out with white noise. In which case, why not map the
soundcard's DMA buffer into the address space of each application
that's using the card, and let each application do its own mixing?
(i.e. the app gets told what volume it's meant to be playing at, scales
its output accordingly, and just adds each sample to the current
contents of the next slot in the buffer. On an SMP machine this
obviously has some drawbacks, but on a UP machine it can work well.
See http://www.cl.cam.ac.uk/~dr10009/audio/ for an implementation of
-- Paul Menage Paul.Menage@cl.cam.ac.uk http://www.cl.cam.ac.uk/~pbm1001/ Magdalene College, Cambridge: (01223) 768063 Atlas Room, University of Cambridge Computer Laboratory: (01223) 331859
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to email@example.com Please read the FAQ at http://www.tux.org/lkml/