How to select left or right speaker with c++ program under windows 7 x64?

290 Views Asked by At

I need to develop a cpp program that receive 2 audios from a vlc server with RTP and it redirect audio 1 to left speaker and audio 2 to right speaker.

I tried to use lib vlc for windows for doing it.

Can you help me with an example using lib vlc for windows 7 x64?

Note: I can find any documenation to use lib vlc for windows 7 x64 platform.

1

There are 1 best solutions below

0
On

If you have 2 connections to the audio renderer, you can create a stereo stream, one from each source channel. In the generated stereo streams one of the channels is silent (all zeros).

  • For left speaker - right channel is all zeros.
  • For ighft speaker - left channel is all zeros,

If you can mux yourself, this is even simpler. Convert the 2 input streams to a single stereo stream. The audio renderer will need to be set to accept the format of the stereo stream.