microsoft / MixedRealityToolkit-Unity

This repository is for the legacy Mixed Reality Toolkit (MRTK) v2. For the latest version of the MRTK please visit https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity
https://aka.ms/mrtkdocs
MIT License
6k stars 2.12k forks source link

Room size no longer functions #3345

Closed gravelvoice closed 5 years ago

gravelvoice commented 5 years ago

There was a function for spatial audio that allowed one to change room size through scripting. The default room size is small. After enabling MS HRTF in the audio settings, a script would appear on your audio sources that would allow you to change the size of the room. This no longer functions. No matter how it's set, the small room is what you get.

According to this documentation

https://docs.microsoft.com/en-us/windows/mixed-reality/spatial-sound-in-unity

you should be able to change the setting through scripting. This no longer functions as well.

after looking at the HoloToolKit - master, in the U Audio Manager, you could also change the size of the room. This no longer functions.

I'm concluding that this is no longer a feature and would be nice is it defaults to "none" rather than "small"

david-c-kline commented 5 years ago

@gravelvoice,

Do you see any log messages / errors in the debugger? That may help to pin down the source of the issue,

Thanks!

david-c-kline commented 5 years ago

Also, which Unity version are you using?

gravelvoice commented 5 years ago

@davidkline-ms , thanks for responding.

gravelvoice commented 5 years ago

I'm using 2018.3.0f2. By debugger, you are referring to the console right? There are no errors. To repro, just place an audio source in a scene, apply the script referenced in the docs (one update is needed of changing 1 to true in the line audiosource.spatialize = 1; // we DO want spatialized audio) it will default to small room and it sounds good, but if you change it to none or large, there is no change in the reverb.

david-c-kline commented 5 years ago

@gravelvoice,

Thank you, this is exactly the information I was looking for! Will investigate and hopefully post an update soon.

gravelvoice commented 5 years ago

Hey @davidkline-ms, Any word on this bug?

Yoyozilla commented 5 years ago

adding to GA task as this is a HTK parity issue. we should at least unblock people

david-c-kline commented 5 years ago

Investigating if this is a change in the MS HRTF dll that Unity provides

david-c-kline commented 5 years ago

I make a simple repro (toggles between small and none on select). in the editor, i am struggling to hear a difference, though the spatializer is clearly enabled and working.

i have tried two sounds i had from earlier projects. i'll continue to investigate

david-c-kline commented 5 years ago

One thing to note is that the effect of changing the room is quite subtle and can be almost hidden depending on the sound source. That said, i generally hear the difference and am definitely not hearing a change.

gravelvoice commented 5 years ago

I would agree that the difference between small and none is subtle, the difference between small and large is quite noticeable. i had to investigate this while working on Actiongram for Hololens. We had to choose one setting for all assets and decided on small as that conformed to most situations that people would be in with our app, but i had always wished to use the SR function to determine room size.

I'm glad you are hearing the "non change" as well. That's what leads me to believe that the script no longer functions.

david-c-kline commented 5 years ago

i had always wished to use the SR function to determine room size.

That's an idea that i have had as well. Once we get this solved, i would love to chat about thoughts i have had on how to implement this feature :)

kegodin commented 5 years ago

@davidkline-ms If you know of any users interested in this feature today, or have insight into requirements or use cases, I'd be interested to hear more.

david-c-kline commented 5 years ago

@kegodin, I am happy to discuss.

BTW, do you have any insight as to why room sizes do not appear to be changing? In current versions of Unity.

kegodin commented 5 years ago

Have you ruled out the possibility of an OS bug? For example, do you know whether only some versions of Unity are affected on a given OS release? If not, I could help by running the HRTF XAPO sample app to check.

david-c-kline commented 5 years ago

I have not. I will install a version of Unity that was known to work and confirm the correct behavior (using the legacy HoloToolkit).

If you have time to confirm the XAPO sample, that would be incredibly helpful to rule out the OS.

kegodin commented 5 years ago

Sounds good, I'll try out the sample app.

kegodin commented 5 years ago

I'm on an Insider build from early June and the sample app works fine (https://github.com/microsoft/Windows-universal-samples/tree/master/Samples/SpatialSound).

david-c-kline commented 5 years ago

Thanks sir! I'll be trying an older Unity (2017.2 and .4) shortly

david-c-kline commented 5 years ago

confirmed the underlying operating system API is functioning correctly. if this continues, it should be investigated as an issue in the mshrtf spatializer plugin (owned by Unity)