Subject: Re: Multiple channels of audio?
To: None <current-users@netbsd.org>
From: Peter Seebach <seebs@plethora.net>
List: current-users
Date: 06/10/2004 10:19:31
In message <40C821A8.40403@bit-1.de>, Werner Backes writes:
>Peter Seebach wrote:
>> So... I'm pretty sure my sound hardware can handle some unbelievably large
>> number of audio channels at once, probably a couple hundred.

>Uh? are you shure the "sound hardware" supports that much channel?

Not entirely sure, but...

>As I understand, "normal" sound chips have 2-8 channels. Professional
>soundcard that are used in music production may have more channels, but
>"several hundreds" seems much to me.

I guess it depends on what level of the hardware you're talking about.
Medium-old sound blaster hardware with onboard memory can play back fairly
large numbers of samples at once, without too much driver help.  Maybe there's
some involved; I haven't looked too closely.  On the laptop card, there's
presumably only two actual output channels at the plug end, but I'm pretty
sure the hardware is capable of fairly elaborate sound without much driver
help.

>Of course it is possible to mix
>several audio streams and play them via one physical audio channel
>but this is mainly an application thing. The audio driver could
>possibly do this for you but I think this would require some major
>changes (introducing "virtual" audio devices and a software mixer whose
>output is fed into the physical audio device).

I'm mostly going off what sound hardware advertises on the box; most PC sound
hardware claims to be able to do 64-channel playback, and some do 128-256 or
more.  I'd assume at least part of this is actual hardware, such that you can
queue up samples and it can play them all at once.

Hmm.  The virtual audio driver idea might be a good one; it'd impose some
performance penalty for the simple case (only one audio source), but it'd be
really nice to be able to play music without losing everything else.

-s