Created
December 23, 2016 01:13
-
-
Save udasan/7f88ddb2abce86c541206331a0f60e11 to your computer and use it in GitHub Desktop.
Steam VR Audio Playback Mirror Device
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public string GetAudioPlaybackMirrorDevice () | |
{ | |
System.Text.StringBuilder sb = new System.Text.StringBuilder(128); | |
Valve.VR.EVRSettingsError er = new Valve.VR.EVRSettingsError(); | |
Valve.VR.OpenVR.Settings.GetString( | |
Valve.VR.OpenVR.k_pch_audio_Section, | |
Valve.VR.OpenVR.k_pch_audio_OnPlaybackMirrorDevice_String, | |
sb, | |
(uint)sb.Capacity, | |
"", | |
ref er); | |
return sb.ToString(); | |
} | |
public void SetAudioPlaybackMirrorDevice (string serial) | |
{ | |
Valve.VR.EVRSettingsError er = new Valve.VR.EVRSettingsError(); | |
Valve.VR.OpenVR.Settings.SetString( | |
Valve.VR.OpenVR.k_pch_audio_Section, | |
Valve.VR.OpenVR.k_pch_audio_OnPlaybackMirrorDevice_String, | |
serial, | |
ref er); | |
Valve.VR.OpenVR.Settings.Sync(false, ref er); | |
} | |
public void ClearAudioPlaybackMirrorDevice () | |
{ | |
SetAudioPlaybackMirrorDevice(""); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment