You’ll find your Audio Devices in your devices.ini file located in the mAirlist folder in C:/Program Files.

From devices.ini (your might be different)

[Playback]
Player0_0=Encoder
Player0_1=WASAPI:default
Player0_2=WASAPI:{0.0.0.00000000}.{88c47e81-19af-4772-a821-dede8f60ad2d}

This script can be called to change the Audio Output from whatever is set in your config, to the encoder. One way only..

begin
    Instance.GetPlaybackRouting.SetSingleAssignment('Player0_0', 'ENCODER')
end.

Or ie.

begin
    Instance.GetPlaybackRouting.SetSingleAssignment('Player0_0', 'WASAPI:{0.0.0.00000000}.{88c47e81-19af-4772-a821-dede8f60ad2d}')
end.

I have created one script per required audio output. And calling whenever needed via a event in mAirlist… Whatever works 😅

Could of course also be used via the OnExecuteCommand procedure

procedure OnExecuteCommand(Command: string);
begin
  if Command = 'CHANGEAUDIO' then begin
    Instance.GetPlaybackRouting.SetSingleAssignment('Player0_0', 'ENCODER')
  end;
end;