GithubHelp home page GithubHelp logo

Comments (25)

AndersMalmgren avatar AndersMalmgren commented on August 17, 2024

Just to be clear, the entire sound engine crashes. No sound from any audiosource is heard after this point.

from steam-audio.

AndersMalmgren avatar AndersMalmgren commented on August 17, 2024

Any ETA when this will be fixed now that its reproduced?

from steam-audio.

achandak avatar achandak commented on August 17, 2024

The fix will be available with next release. Until then, consider using raycast occlusion instead of partial occlusion to sidestep the issue.

from steam-audio.

lakulish avatar lakulish commented on August 17, 2024

We have just released Steam Audio v2.0-beta.2. This issue should be fixed now, can you try out the latest version and let us know if you're still facing this issue?

Get the latest version from https://valvesoftware.github.io/steam-audio/.

from steam-audio.

AndersMalmgren avatar AndersMalmgren commented on August 17, 2024

Im getting

Environment and Environmental Renderer component must be attached when reflections are enabled or direct occlusion is set to Raycast or Partial.
UnityEngine.Debug:LogError(Object)
Phonon.PhononSource:Awake() (at Assets/Phonon/Simulator/PhononSource.cs:47)

after update. This is my listener

settings

from steam-audio.

AndersMalmgren avatar AndersMalmgren commented on August 17, 2024

We load player dynamic att scene start if that could be the problem

from steam-audio.

AndersMalmgren avatar AndersMalmgren commented on August 17, 2024

Yepp, its most definitely connected to that. You need to make sure that the library works with no listener in the scene. Beta 1 did this

We add listener at this event: SceneManager.sceneLoaded

from steam-audio.

lakulish avatar lakulish commented on August 17, 2024

You can move the Environment and Environmental Renderer components to an empty GameObject that you create, which is not dynamically loaded. That should resolve the issue.

We will update the documentation to clarify this.

from steam-audio.

AndersMalmgren avatar AndersMalmgren commented on August 17, 2024

So it does not need to be attached to the Audio listener object at all?

from steam-audio.

lakulish avatar lakulish commented on August 17, 2024

Nope, it just needs to be present somewhere in the scene.

from steam-audio.

AndersMalmgren avatar AndersMalmgren commented on August 17, 2024

ok tried that, now I get.

NullReferenceException: Object reference not set to an instance of an object
Phonon.PhononSource.UpdateRelativeDirection () (at Assets/Phonon/Simulator/PhononSource.cs:117)
Phonon.PhononSource+c__Iterator0.MoveNext () (at Assets/Phonon/Simulator/PhononSource.cs:100)
UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
Phonon.PhononSource:OnEnable() (at Assets/Phonon/Simulator/PhononSource.cs:53)

from steam-audio.

AndersMalmgren avatar AndersMalmgren commented on August 17, 2024

Its because you do,

            listener = FindObjectOfType<AudioListener>();

in awake

edit: I would lazy load those

from steam-audio.

achandak avatar achandak commented on August 17, 2024

Thanks for catching this.

Yup, lazy load this and you should be fine. We will fix this on our end and see if there are similar issues elsewhere in the plugin.

from steam-audio.

AndersMalmgren avatar AndersMalmgren commented on August 17, 2024

Cool, let me know how it goes. I dont want to mess with vendor code, will be merge hell

from steam-audio.

AndersMalmgren avatar AndersMalmgren commented on August 17, 2024

This does the trick, dont know if calling FindObject every frame until it exists is elegant enough for production code

        private void UpdateRelativeDirection()
        {
            if ((listener = listener ?? FindObjectOfType<AudioListener>()) == null) return;

            sourcePosition = Common.ConvertVector(transform.position);
            listenerPosition = Common.ConvertVector(listener.transform.position);
            listenerAhead = Common.ConvertVector(listener.transform.forward);
            listenerUp = Common.ConvertVector(listener.transform.up);
        }

from steam-audio.

AndersMalmgren avatar AndersMalmgren commented on August 17, 2024

yield return new WaitForEndOfFrame(); creates some garbage. Better to cache the WaitForEndOfFrame in a private member

from steam-audio.

bddckr avatar bddckr commented on August 17, 2024

@AndersMalmgren yield return null; is the same as yield return new WaitForEndOfFrame(); and means you don't need a private cached variable 😄

from steam-audio.

AndersMalmgren avatar AndersMalmgren commented on August 17, 2024

I read somewhere they fire at different places in a frames lifetime.

from steam-audio.

achandak avatar achandak commented on August 17, 2024

@AndersMalmgren - that is pretty much the fix we are pushing shortly. Are you seeing any other issue after you make that change?

from steam-audio.

AndersMalmgren avatar AndersMalmgren commented on August 17, 2024

I had to leave the office for the evening, but I'll try to reproduce the crash bug tomorrow

from steam-audio.

bddckr avatar bddckr commented on August 17, 2024

@AndersMalmgren You're right. But I think in this case null should be fine?

from steam-audio.

AndersMalmgren avatar AndersMalmgren commented on August 17, 2024

If next update is dependant on it then you should not use null

http://answers.unity3d.com/questions/755196/yield-return-null-vs-yield-return-waitforendoffram.html

from steam-audio.

achandak avatar achandak commented on August 17, 2024

Last time we checked, WaitForEndOfFrame() was needed to get correct camera information in a VR setup.

We have updated 2.0-beta.2 release with couple of hotfixes.

from steam-audio.

AndersMalmgren avatar AndersMalmgren commented on August 17, 2024

Hey guys. I can not reproduce crash bug. So thats good. But the fall off is way too aggressive, we cant use it as it is sadly. Even with a Indirect Mix Fraction at 5 the sound falls away almost right away after rounding a corner. Also a Indirect Mix Fraction of 5 changes the characteristics of the sound too much.

Hope you guys are wokring on that because this is really a nice tool otherwise. Great work!

from steam-audio.

achandak avatar achandak commented on August 17, 2024

@AndersMalmgren - I will close this issue out if the clipping bug is resolve. I have posted on your Forum post on Aggressive cutoff. Moving the discussion there.

from steam-audio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.