Output sound on a specific speaker on a 5.1 surround system using dsound.h library

Viewed 84

I have a 5.1 surround system that I am using to output some WAV files. I am coding in c++ a way to output the sound on one of the speakers.

basically is there any way I can say, x.wav file output sound only on the corner left speaker? like has a speaker generate an address?

1 Answers

Your best bet is probably to output a full 5.1 stream, but output zero samples for the channels you don't want to play. That's easy enough to do and will control which speaker is actually 'active'. A bit of experimentation should tell which which channel that corresponds to.

The output stream has the channels interleaved, BTW, so take that into account when writing your code.

Related