Re: Playing audio in multi-channel audio device(e.g 5.1 sound system).
- From: "Chris P. [MVP]" <msdn@xxxxxxxxxxxx>
- Date: Mon, 24 Jul 2006 14:00:45 -0400
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
.
- Prev by Date: RE: WMP ActiveX control kills Internet Explorer
- Next by Date: AVIERR_MEMORY error on AviFileOpen()
- Previous by thread: RE: WMP ActiveX control kills Internet Explorer
- Next by thread: Re: Playing audio in multi-channel audio device(e.g 5.1 sound syst
- Index(es):
Relevant Pages
|