Recently I listened music on my machine. And I plugged headphones and music played perfectly. Than I plugged stereo and wondered that sound switched from headphones to stereo. I've surfed the web and didn't find out anything useful(just about sound cards, interfaces, etc).
However, I wanna to learn more about how PC delegated signals to multiple devices. Also, I wanna discover is it possible to switch actual audio output devices programmatically on different operating systems(Linux, Windows, etc) (with c#)?
I've also tried play with LibVLCSharp to switch plugged audio output devices (from headphones to stereo output). However, instead of working with actual output devices I faced with audio card interfaces, device indentifiers, which are not related with actual audio-out devices.
using var libvc = new LibVLC();
_mediaPlayer = new MediaPlayer(libvc);
media = new Media(libvc, new Uri(_path));
_mediaPlayer.EnableHardwareDecoding = false;
_mediaPlayer.SetAudioOutput(desc.Name);
_mediaPlayer.SetOutputDevice(k.DeviceIdentifier);
_mediaPlayer.Play();
_mediaPlayer.Play(media);
Console.WriteLine(_mediaPlayer.OutputDevice);
//etc
Eventually, I want to direct signals from one device to another.