Answer the question
In order to leave comments, you need to log in
How to simultaneously play 2 audio files in C#, each on its own speaker?
The situation is as follows, there are 2 speakers connected to the same PC, but located in different rooms.
Under a certain condition, the application (windofs forms) must play 2 audio files, each will be heard only from its own speaker.
Downloaded several different libraries - NAudio, LibZplay. It turns out to display the file on one column, the volume of the second is reduced. And how to do for two files, I'll never know.
Answer the question
In order to leave comments, you need to log in
Understood:
var input1 = new WaveFileReader(файл1.wav");
var input2 = new WaveFileReader(файл2.wav");
var waveProvider = new MultiplexingWaveProvider(new IWaveProvider[] { input1, input2 }, 2);
waveProvider.ConnectInputToOutput(0, 0);
waveProvider.ConnectInputToOutput(1, 1);
WaveOut Device = new WaveOut();
Device.Init(waveProvider);
Device.Play();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question