using System;
using System.Drawing;
public static class DisplayFusionFunction
{
public static void Run(IntPtr windowHandle)
{
string defaultName = BFS.Audio.GetDefaultPlaybackSounds();
//
// Name of Speaker Device. You have to change the value to your system.
//
string spkName = "Realtek High Definition Audio";
//
// Name of Headset Device. You Have to change the value to your system.
//
string headsetName = "USB ";
string newName = "";
if (defaultName.Contains(spkName)) {
newName = headsetName;
} else {
newName = spkName;
}
string[] audioDevices = BFS.Audio.GetPlaybackDevices();
foreach (string device in audioDevices) {
if (device.Contains(newName)) {
BFS.Audio.SetDefaultPlaybackSounds(device);
break;
}
}
}
}