llealloo / audiolink

Audio reactive prefabs for VRChat
Other
346 stars 38 forks source link

AVPro Audio issue when applying Low Pass filter to audio source #301

Open PhillipDiCarlo opened 4 months ago

PhillipDiCarlo commented 4 months ago

Describe the bug in detail: Using the latest 2022 unity, when using USharp video player and having audiolink, When I am auto playing a video upon loading. Any audio source that has a Low Pass filter attached to it seems to get ignored and the spatialization seems to be converted to 2D audio. Even when disabling the filter while still having the component attached to the audio source causes this bug.

The only workaround that seems to work is having a custom script attach a low pass filter to the object AFTER loading in and having a video source be loaded into the player. However, this is not compatible with VRChat and thus only works in Unity.

A similar report #156 was closed with before with what appears to be no solution

teehzero commented 4 months ago

Have you confirmed this behavior does not exist when AudioLink is not present? Does USV have an AudioLink adapter that might be changing settings behind the scenes? I have a feeling this is more to do with AVPro not being able to use audio filters in VRC than with anything AudioLink is doing. If USV gives you the option, you can try using the Unity Video Player instead of AVPro, as it currently does support audio filters, but doesn't support some other stuff.

ProTV gets around this by using separate audio sources with AVPro Video Speakers with volume near zero to drive AudioLink. I use ProTV w/ Unity Video Player and my DSP works fine.

PhillipDiCarlo commented 4 months ago

ProTV gets around this by using separate audio sources with AVPro Video Speakers with volume near zero to drive AudioLink. I use ProTV w/ Unity Video Player and my DSP works fine.

How do you go about using ProTV? Looks like its still uses AVPro as described here

techanon commented 2 months ago

How do you go about using ProTV? Looks like its still uses AVPro as described here

ProTV supports using (and swapping between) both AVPro and UnityVideo as the video engines. The default Simple (ProTV) prefab comes with both that the user can choose from.

Due to quirks about how AVPro is handled and how Unity handles the DSP processing, it's not really feasible to get audio filters to work on AVPro speakers.

Theoretically it's possible to extract AVPro audio and use your own object for a DSP stack, but that introduces latency, fragility and high risk of audio breakage (popping, clicking, screeching, etc). Doing so is very much not advised unless you know exactly what you are doing. It is more reasonable to deal with it for now and vote on the canny proposal listed on the page you linked.