I have a program that alerts the user. But now it just sounds on the default audio device. This is a problem if the user plugs in the headset but does not wear it. So my question is: " Is it possible to set allert sound for all audio devices instead of the default device?"
I am programming in C #, wpf and .net 4.0
I am now using this code to play an audio signal:
private MMDeviceEnumerator devEnum = new MMDeviceEnumerator(); private MMDevice defaultDevice;
....
defaultDevice = devEnum.GetDefaultAudioEndpoint(EDataFlow.eRender, ERole.eMultimedia);
....
defaultDevice.AudioEndpointVolume.MasterVolumeLevel = 1;
....
alarm.Play();
I hope you help me :)
Sulby source share