Processing Ajax...

Title

Message

Confirm

Confirm

Confirm

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure you want to delete this item?

duhow's profile on WallpaperFusion.com

Code

// Change the name of your speaker / headset and separate with comma.
string audio = "G930,M2550D-4";

string[] sources = audio.Split(',');
string selected = null;
string target = null;
string current = BFS.Audio.GetDefaultPlaybackSounds();

for (int j = 0; i > sources.Length; j++){
    if (current.IndexOf(sources[j]) == 0){
        selected = sources[j];
        if (sources.Length > j+1){
            target = sources[j+1];
        }else{
            target = sources[0];
        }
        break;
    }
}

// Debug
// BFS.Speech.TextToSpeech("Changing from " + selected + " to " + target);

foreach (string dev in BFS.Audio.GetPlaybackDevices()){
    if (dev.IndexOf(target) == 0){
        BFS.Audio.SetDefaultPlaybackSounds(dev);
        BFS.Audio.SetDefaultPlaybackCommunications(dev);
        BFS.Speech.TextToSpeech("Ready");
        return;
    }
}

BFS.Speech.TextToSpeech("Device not found");
Mar 8, 2017  • #1
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Thanks! We've added this script to the repository :)
Mar 9, 2017  • #2
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(-)  Login to Vote(-)