Changing sound output with Macro/addon/etc

First you would need to list the devices you have installed and select which ones to use

/run local num = Sound_GameSystem_GetNumOutputDrivers()	for index=0,num-1,1 do print(index, Sound_GameSystem_GetOutputDriverNameByIndex(index)) end

Once you know which two to swap between,

/run local x = tonumber(GetCVar("Sound_OutputDriverIndex")) if x == 0 then SetCVar("Sound_OutputDriverIndex", "3") else SetCVar("Sound_OutputDriverIndex", "0") end AudioOptionsFrame_AudioRestart()

Change the 0 and 3 to your prefered devices.

Or Elvenbane’s approach :slight_smile:

14 Likes