-
Notifications
You must be signed in to change notification settings - Fork 38
HMD's rotation is ignored, on a playing AudioSource, once another AudioSource stops playing #54
Comments
Note: I've noticed that after step 16, by manually toggling (in Unity's inspector) the Output (outputAudioMixerGroup) of the audioSource1 to None and then back to ResonanceAudioMixer/Master, the playing clip for that source starts tracking the HMD's rotation once again. |
I wonder if this explains the weird elusive problem I had where spatialization was correct in a minimal test scene but seemed to reverse left and right in anything complex. |
I am having the same problem with Unity 2018.2f12. I noticed that the audio positions/spatialization updated only on the first frame when I called AudioSource. play() after any AudioSource finished playing. I hope this can be sorted out soon. |
Could we get any acknowledgement about this issue from the devs? In general it's beginning to seem like this is an abandoned project - which is a shame. |
Hi folks. Can you please submit a bug using the bug reporter tool and include a minimum repro project so that I can see the exact setup? Please send the bug number/title here once you get the reply email so I can grab it and start working on it? |
@CrazyOldMaurice I had a go at creating a minimal test case but it wasn't clear what the trigger was. It happened in a complex scene and didn't happen in a simple scene. I ran out of time to pin it down (switched to the Oculus Spatializer instead). If it helped it seemed to happen irrespective of Unity version (2018.x) and I was using the latest released version of Resonance. My tests were before I saw this ticket so I didn't think to check for this precise cause but the symptom was that left and right were reversed in spatialized sound. |
@CrazyOldMaurice where can we find the bug reporter tool you mentioned please? Or do you mean opening another issue on Github? |
@masammut the Unity bug reporter is found under the editors Help tab -> Report a bug... @andybak a repro project from you might help me to figure out what's happening more quickly, please make a separate bug report for your issue in case it turns out to be something different from masammut's. Thank you both for your assistance and patience. |
Did either of you use the bug reporter to file a bug and upload a repro project for me to look at? |
@CrazyOldMaurice I'm afraid a repo project is really not feasible without a ton of work which I am unlikely to have the time for now that I got around the issue (sadly by ditching Resonance) |
I can understand that. I'll keep an ear out and hopefully someone will
have a repro project that can reliably reproduce it. We can take a bug
submission with a project that can be tagged to not be made publicly
available, but if it's a very large project it may still take forever to
upload it through the bug reporter.
…On Tue, Nov 20, 2018 at 12:25 AM Andy Baker ***@***.***> wrote:
@CrazyOldMaurice <https://github.com/CrazyOldMaurice> I'm afraid a repo
project is really not feasible without a ton of work which I am unlikely to
have the time for now that I got around the issue (sadly by ditching
Resonance)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#54 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AgFEyb9QJ8hZLH16qtItBBw4J76Hv1yDks5uw7xsgaJpZM4XZKaQ>
.
|
So, good news. I got pointed to a non-VR forum post that I sounded suspiciously like this one. I was able to make a good repro project locally and get it to one of our devs to investigate further. I think he may have something figured out, but I'm not sure if it's something that should fixed in Unity code, or if it is something that needs fixed in the plugin. Will update as I can if there's a fix and/or workaround. |
Checkmark "Play in Awake" and use enable = true/false instead. |
Any update on what in particular the issue is/was and how it presents itself? & if using Unity 2017.3.1f1 / 2018.1.0f2 protects against it? |
Workaround is to toggle active/inactive on the GameObject or enabled/disabled on the AudioSource component after any audio source ends, see code snippet here: #55 (comment) |
Hey, if my audiosource is set to 'Play On Awake' using the code snippet restarts the audio, how would I get around this? I'm sure it's a very simple answer but I'm very new to coding. All the best |
Any news on the fix? The enable/disable workaround is not practical for a large complex project. We are about to decide to not use Resonance but I was wondering if any progress has been made on this issue? Thanks! |
Hi. I discovered that if you put all the audiomixers´ "Update mode" on Unscaled time instead of normal it works. |
How does one do that? Bit of a newbie here. Though if you've solved this you're wonderful. All the best |
Hi. It does not solve it completely. Sometimes I still get the error. :( You open the audimixer panel, select the existing audiomixer, or the one that you created, and on the inspector you see the "Update mode" drop down menu, |
Quasi-good news. I tried a basic test scene with two short audio sources repeating starting/stopping on timers, and one continuous looping source. This repros the bug 100% reliably in the original reported case. I tried the same scene across three Unity versions. Looks like an upgrade to 2019 might fix this if you're having this bug. |
So, good news is that we've implemented a fix in 2019.1+. On previous versions the work around will be needed. On a plus side the workaround is fairly simple. On your audio sources be sure to call source.SetSpatialize(false) after the sound is done playing and be sure to call source.SetSpatialize(true) before you play another sound through that audio source. The issue is that the Resonance may get it's audio listener coordinates from a stale audio source. So something like MySpatializedAudioSource.SetSpatialize(false) when it's finished playing a sound. |
The issue still seems to be there in 2019.1.5 for me. Anyone else? |
Yeah, actually, still having intermittent issues in 2019.1.5f1 here. Definitely way better, but not 100%. :( |
@purplejamltd Would you have a repro project/steps if you're catching it frequently? My testing still looks good for this issue. |
I've worked a few programming contracts on projects that utilize Resonance Audio, a few even brought me onboard specifically to help them with this particular issue. In every case, I've resolved the issue creating a unique child GameObject of the Audio Listener. This is a practice that I utilize in every project that I work on, and I do likewise with the Audio Source elements. I simply make a child GameObject at the origin or the camera (0,0,0), add the Resonance Audio Listener component to it, and I have Resonance Audio Source objects applied individual GameObjects as well. If I'm spawning Audio Source components on dynamically instantiated GameObjects, I ensure that those are spawned free of any extra components or children. You don't want these objects colliding with other components or for the component prioritizing to be compromised in any way, or it simply won't work. I've implemented this process since I started used using over 6 years ago, and still do it now. It has also resolved my clients' issues from Unity version 2018.1 to 2019.2. I haven't done any work, personal or professional, in 2019.3 yet, but will confirm once I have. |
I'm not sure if this is a Unity, a Resonance Audio bug or if I'm doing something wrong, but on Unity >= 2018.2.2f1 the HMD's rotation (possibly position too, but untested) is ignored on a playing AudioSource, once another AudioSource stops playing (only tested with 2 AudioSources).
This works fine in:
Seems to be broken in:
(Note: In this example I'm using SteamVR version 1.2.3 because version 2 has issue with 2018.3 at the moment, but I've managed to recreate the same issue using SteamVR 2.0.1 (see notes below))
Steps to recreate:
Notes:
The text was updated successfully, but these errors were encountered: