简体   繁体   中英

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

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM