follows:
public void PlaySoundInDevice(int deviceNumber, string fileName)
{
if (outputDevices.ContainsKey(deviceNumber))
{
outputDevices[deviceNumber].WaveOut.Dispose();
outputDevices[deviceNumber].WaveStream.Dispose();
}
var waveOut = new WaveOut();
waveOut.DeviceNumber = deviceNumber;
WaveStream waveReader = new WaveFileReader(fileName);
LoopStream loop = new LoopStream(waveReader);
waveOut = new WaveOut();
waveOut.Init(loop);
waveOut.Play();
// hold onto the WaveOut and WaveStream so we can dispose them later
outputDevices[deviceNumber] = new PlaybackSession { WaveOut = waveOut, WaveStream = waveReader };}
Ihave 3 external soundcard and the wave out of the 3 sond card
Is anybody can help me please and thank you in advance.