I wish that, when an event is launched in my application, a sound will be reproduced both in an earphone (if I have it connected) and in the speakers of my pc. I was testing with WaveOut but it did not work. Thanks
I wish that, when an event is launched in my application, a sound will be reproduced both in an earphone (if I have it connected) and in the speakers of my pc. I was testing with WaveOut but it did not work. Thanks
The path you were taking with the WaveOut
is correct, maybe what you would be missing is to define the property DeviceNumber
How to play sound on many devices at the same time
Play a sound in a specific device with C #
var waveOut = new WaveOut();
waveOut.DeviceNumber = deviceNumber;
WaveStream waveReader = new WaveFileReader(fileName);
waveOut.Init(waveReader);
waveOut.Play();
I would also recommend you take a look at NAudio
Send sound to different audio devices
uses example suando several audio libraries and take into account the output device