Re: Playing audio in multi-channel audio device(e.g 5.1 sound system).



On Mon, 24 Jul 2006 00:24:02 -0700, Manoj wrote:

I have an application where 4 audio files are played simultaneously in two
channels of two conventional stereo cards.
I have to migrate this to playing using a 5.1 system. There are limitations
to existing WAVEFORMAT which does not identify multi channel device.
Can anyone help me with the procedure how to package the audio packets and
assign to the multi channel sound card?
I found a replacement for WAVEFORMAT in form of WAVEFORMATEXTENSIBLE.
Suggestions/help or sample code are highly appreciated.

Yes WAVEFORMATEXTENSIBLE is the way to go. I have a streaming DirectSound
sample that illustrates the channel layout:
http://www.chrisnet.net/samples/StreamDataToneSurround.zip

There are 2 ways of approaching this using the channel mask. I theory if
you set the channel mask to KSAUDIO_SPEAKER_QUAD, you just have to output
the 4 channel data. The channel data is interleaved per sample, meaning
that you pack the data as Ch1, Ch2, Ch3, Ch4, Ch1, Ch2, Ch3, Ch4, ...
The other way is to send a full 5.1 stream but you would have to insert 2
empty channels for the front center and low freq. This would have the
packing of Ch1, Ch2, 0, 0, Ch3, Ch4, Ch1, Ch2, 0, 0, Ch3, Ch4, ...

--
http://www.chrisnet.net/code.htm
http://www.avdevforum.com/AV
.



Relevant Pages

  • Re: how to know information of a remote object, that ist reqistered.
    ... Cast every registered channel to IChannelData. ... Get the channel data uri's, they have the form http://hostname:port or ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: getting channel properties
    ... Cast every registered channel to IChannelReceiver. ... Get the channel data uri's, they have the form http://hostname:port or ... > Given that I've just configured a channel from a config file using ...
    (microsoft.public.dotnet.framework.remoting)