[986] AVPro player ignores LowPass, Reverb and other filters
closed
orels1
Similar to current situation with SDK2 - using an AVPro udon player together with audio effects is not possible
You get the following warning in the log
2020.09.05 01:09:19 Warning - Only custom filters can be played. Please add a custom filter or an audioclip to the audiosource (Audio Source).
Log In
Tupper - VRChat Head of Community
closed
This is a "can't fix" / "won't fix".
Just like in SDK2, AVPro's audio implementation isn't very robust in regards to how it injects audio.
As such, this is a limitation of the plugin, and we will not be able to address the issue.
orels1
Tupper - VRChat Head of Community: Well, we know tha AVPro itself supports audio filters just fine, so I guess its something about how VRC has it set up, which is unfortunate.
I double checked using the AVPro trial and it played through audio filters via the provided Audio Output component and with the Windows-specific settings set to Unity Audio.
TCL
orels1: The difference between your setup and VRChat's is that VRChat adds the AVPro AudioOutput component at runtime. This means that it's always the last component on the GameObject so it runs its audio code last. The AVPro AudioOutput component uses OnAudioFilterRead to inject the audio from the MediaPlayer into the AudioSource which since this happens after the other audio filters have run they cannot affect it. Unity doesn't expose any methods for rearranging the order of components at runtime so we can't just move the AudioOutput to be above the filters.
orels1
@{5fa30b66b36d4b12af626dc8|full_name}: ok, that's fair, altho i just tested this shitty code for adding at runtime, and it seems like just moving it up and toggling the effects on and off on the same frame - makes it re-apply them
But i guess you can't just shove an internal method without some hacky solutions :thinking: Thanks for details tho! At least it helps to understand what's going on :P
Μerlin
@{5fa30b66b36d4b12af626dc8|full_name}: At this point I guess it'd be more of a feature request, but if you can't reorder the AudioOutput that's created by VRC, it would be nice if we could add an AudioOutput component ourselves. So the AVPro AudioOutput component would need to be whitelisted for SDK3 worlds (it's already whitelisted for SDK2 worlds) and the VRCAVProVideoSpeaker component would need an option to point to a Component reference for the AudioOutput, or a GameObject reference to the game object the AudioOutput is on to keep the SDK decoupled. The VRCAVProVideoSpeaker would then hook up the AVPro media player that VRC creates at runtime to the AudioOutput.
Tupper - VRChat Head of Community
Merged in a post:
[986] AVPro player with any effects attached ignores all audio source settings
orels1
If you attach any audio effects like reverb or low pass to the AVPro based Udon player - a warning will be posted in your console and all the audio source settings like Spatialization or Volume would be ignored, and the source would play in 2D mode at full volume
2020.09.05 01:09:19 Warning - Only custom filters can be played. Please add a custom filter or an audioclip to the audiosource (Audio Source).
Tupper - VRChat Head of Community
tracked