Question about dwChannelMask

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



First, my setup:

I'm using DirectX/DirectSound 9.0c, June 08, with a Creative Sound Blaster
Audigy HD and latest drivers. I've got a 5.1 speaker set plugged in and
configured correctly.

Now onto my questions:

Create a DirectSound device, create DirectSound buffer using
WAVE_FORMAT_EXTENSIBLE, Format.nChannels = 1, dwChannelMask = 0, and load the
buffer with an audio sample that has 1 channel in it. The dwFlags only has
volume and pan bits set (not the CTRL3D bit), then play the sound. The result
is that the sound plays out all 5.1 speakers (as expected).

However, if I set the dwChannelMask = 0xffffffff and play the sound, it only
plays out the front-left speaker, as if it is defaulting the first channel in
the sample to the first speaker, followed by the second channel to the second
speaker, etc. This isn't what I expected. (In fact, on another PC with a
RealTek chip/drivers, setting the dwChannelMask to 0 vs 0xffffffff made no
difference. Hence I'm thinking this is a device driver issue.) But it did
raise a few interesting questions in my mind, so I thought I'd ask for advice
from everyone.

1. How do I set up a 1 channel audio sample to play out a specific set of
speakers? (e.g. setting dwChannelMask = 0x30.)

2. How do I set up a 2 channel audio sample to play a specific channel out a
specific set of speakers? (e.g. make channel 0 play out the front left and
rear right speaker, and make channel 1 play out the front right and rear left
speaker.)

Thanks!
-john woznack

p.s. Playing 1 channel samples using CTRL3D and all of the HRTF stuff works
correctly, so this problem seems related to just the non-HRTF playback.
.



Relevant Pages

  • Re: Marshall JVM
    ... They make you sound really good. ... and to play it a lot to see if it has what you want. ... are talking about the low gain channel. ... Right now I have a clean that's pretty close to the kinda dry clean you hear ...
    (alt.guitar.amps)
  • Re: DirectSound and MFC
    ... I have an intentionally simple application wherein an MFC ... >form is created with a single button, Play Sound. ... > DirectSound except for the two items that seem to me to be generic to ... > When I run the program and attempt to play the sound nothing happens. ...
    (microsoft.public.vc.mfc)
  • Re: DirectSound and MFC
    ... I have an intentionally simple application wherein an MFC ... >form is created with a single button, Play Sound. ... > DirectSound except for the two items that seem to me to be generic to ... > When I run the program and attempt to play the sound nothing happens. ...
    (microsoft.public.vc.language)
  • Re: Multichannel Audio
    ... >> I used DirectSound, but this library also places the sound on adjacent ... > single channel you should be able to use the channel mask to play out to ...
    (microsoft.public.win32.programmer.mmedia)
  • Re: Question about dwChannelMask
    ... I'm using DirectX/DirectSound 9.0c, June 08, with a Creative Sound Blaster ... Create a DirectSound device, create DirectSound buffer using ... buffer with an audio sample that has 1 channel in it. ... setting the dwChannelMask to 0 vs 0xffffffff made no ...
    (microsoft.public.win32.programmer.directx.audio)