-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing Linux features #43
Comments
sorry, if this doesn't belong here, but I'd like to ask if revive should work via steamplay. |
I have never tried revive but I wouldn't give much hope to wine properly being able to bridge both ways between the windows and linux openvr, it's always worth a try if you have a use case for it though. |
thanks for your thoughts. |
Source outputs must all be moved to new default source. Reference topic https://askubuntu.com/a/72076 * Adds microphone controls on Linux via PulseAudio (PA) for several points in #43. It can not be overstated how unsuited the public AudioManager API is for using the PA API. It can also not be overstated how undocumented and horrible the PA API is. The PA way of doing audio is very unlike the Windows way of doing audio, which the AudioManager is heavily influenced by. Since I don't have a Linux machine I have not been able to personally test this. https://github.com/feilen/ has graciously helped with testing. PulseAudio is very undocumented and not very widely used for what we need outside of official utilities. As such there's most likely a better way of doing things than I've done. Additional information can be found at https://github.com/username223/pulseaudio-device-changing. The "complex" PA API is asynchronous. Since our current AudioManager is running synchronously and would not work asynchronously (functions are expected to return valid data on function return) it is necessary to massage the PA API until it runs synchronously. This is done with a general workflow of 1. Register a callback function (`pa_context_get_source_info_list()`, for example). 2. Run the PA loop through `customPulseLoop()`. This will trigger any registered callbacks. Sometimes a `void*` is passed through the callback that can be used for custom data. `successCallback()` uses this to set the success variable. 3. Run the callback function and do required work. 4. Return to original function, do work or return values. It is not possible to run a `customPulseLoop()` inside of an already running loop (inside a callback), as this will lead to a PA assert error on runtime.
Source outputs must all be moved to new default source. Reference topic https://askubuntu.com/a/72076 * Adds microphone controls on Linux via PulseAudio (PA) for several points in #43. It can not be overstated how unsuited the public AudioManager API is for using the PA API. It can also not be overstated how undocumented and horrible the PA API is. The PA way of doing audio is very unlike the Windows way of doing audio, which the AudioManager is heavily influenced by. Since I don't have a Linux machine I have not been able to personally test this. https://github.com/feilen/ has graciously helped with testing. PulseAudio is very undocumented and not very widely used for what we need outside of official utilities. As such there's most likely a better way of doing things than I've done. Additional information can be found at https://github.com/username223/pulseaudio-device-changing. The "complex" PA API is asynchronous. Since our current AudioManager is running synchronously and would not work asynchronously (functions are expected to return valid data on function return) it is necessary to massage the PA API until it runs synchronously. This is done with a general workflow of 1. Register a callback function (`pa_context_get_source_info_list()`, for example). 2. Run the PA loop through `customPulseLoop()`. This will trigger any registered callbacks. Sometimes a `void*` is passed through the callback that can be used for custom data. `successCallback()` uses this to set the success variable. 3. Run the callback function and do required work. 4. Return to original function, do work or return values. It is not possible to run a `customPulseLoop()` inside of an already running loop (inside a callback), as this will lead to a PA assert error on runtime.
@Goofybud16 uses a script to emulate the mirror device: pactl load-module module-loopback sink=alsa_output.usb-Yamaha_Corporation_MG-XU-00.analog-stereo source=alsa_input.usb-Valve_Corporation_Valve_VR_Radio___HMD_Mic_8B37344787-LYM-01.mono-fallback
pactl load-module module-null-sink sink_name=Youtube
pacmd update-sink-proplist Youtube device.description=Youtube
pactl load-module module-loopback source=Youtube.monitor sink=alsa_output.usb-Yamaha_Corporation_MG-XU-00.analog-stereo
pactl load-module module-loopback source=Youtube.monitor sink=alsa_output.pci-0000_2f_00.1.hdmi-stereo-extra3 Although this also creates a sink for outputting Youtube audio to the microphone. The pactl and pacmd sources should help with this. According to this SO link, I believe |
Just want to make a clarification: Since being shown module-combine-sink, I've updated my script to use that. Also, the script with the null-sink and loopback introduces much more latency than the combine-sink, while achieving the same goal [one audio sink that plays to two physical devices that can individually have the playback volume turned up/down from the sink vs other audio sources]. |
@Goofybud16 Thanks. Could you paste the new script here, just for completeness? |
and to undo that setup
The configuration this sets up is echoing the Index mic into my mixer [MG-XU], as well as creating a mirrored sound-source that plays into the Index headphones and the mixer. The mirrored sound-source has individually controllable volumes, and I usually keep the one going into the mixer muted [I just manually mute it in pavucontrol once the script is run.] Applications then pick up the microphone input from the mixer. It allows me to apply EQ to the HMD mic, as well as occasionally play a snippet of audio or something when relevant to a conversation. |
The following features are missing from the project in order to achieve feature parity with Windows:
The text was updated successfully, but these errors were encountered: