Hello everyone.

We have decided to phase out the Mixed Reality Forums over the next few months in favor of other ways to connect with us.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

The plan between now and the beginning of May is to clean up old, unanswered questions that are no longer relevant. The forums will remain open and usable.

On May 1st we will be locking the forums to new posts and replies. They will remain available for another three months for the purposes of searching them, and then they will be closed altogether on August 1st.

So, where does that leave our awesome community to ask questions? Well, there are a few places we want to engage with you. For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality. If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers. And always feel free to hit us up on Twitter @MxdRealityDev.

No sound in Origami: unity unable to load AudioPluginMsHRTF.dll during build

UnauthorizedAccessException: Access to the Path "Temp\StagingArea\Data\Managed\Plugins\X86\AudioPluginMsHRTF.dll" is denied.
System.IO.File.Delete (System.String path) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:179)...

I am using 64-bit Unity and build 5.4.0b20-HTP which includes HRTF already present. I don't see the Resources folder which would hold the sound files as well. Perhaps the build died upon the exception and didn't complete. Origami seems to work in every other way. I'll try loading HRTF separately to see if that helps.


Best Answer


  • @rhenninger according to the Release notes for b20:

    And if you drill into that link:

    the docs mention:

    If you don't want to use the excellent Audio tools in HoloToolkit, here is how you would change HRTF Parameters. You can copy/paste this into a script called SetHRTF.cs that you will want to attach to every HRTF AudioSource.

    Since Origami was created prior to the holotoolkit I would guess that it references that SetHRTF.cs and probably needs to be modified to use the AudioSpatializer component mentioned in the release notes.

    Windows Holographic User Group Redmond

    WinHUGR.org - - - - - - - - - - - - - - - - - - @WinHUGR
    WinHUGR YouTube Channel -- live streamed meetings

  • Thanks for your reply. Further investigation suggests HRTF is not the real issue. Last night after posting, I tried dropping back to 2D sound to see if I could get a build to verify that HRTF might be the issue or just a symptom. Builds still failed, but now gave the "unauthorized" message about the WinRTLib dll that Unity uses for legacy, non-WinRT C# classes. So I suspected that my Unity install was broken somehow - permissions perhaps. The only unusual thing I recall doing was a clean and rebuild on the VS side - which I often do on projects.

    This morning, I cleared and re-installed 5.4.0b20 and started to retrace my steps from scratch. My own trial project worked fine after deleting all folders but Assets and ProjectFiles. Then I brought in a fresh Origami folder set. From the build of the first step (just adding lights, spheres etc.), Unity complains with IO exception claiming the Temp\StagingArea\Data\Managed\Plugins\x86 directory is not empty. Maybe the Origami assets are not usable in 5.4.0b20? I'll keep experimenting. Last resort, I can drop back to b18 for the tutorial. That always worked.

    One thought, the build did declare that it was including the HRTF plugin even though I had yet to reference it in code. (Probably in project audio settings). I'll check that out.

  • After more experiments: Did a project from scratch (Holograms 100) and added spatial audio using HRTF playing Ambient.wav from Origami on the cube. All works fine - even switched and restarted sound system when I plugged in my headset audio to override my usual DAW monitors and got the sample rate right without my intervention.

    Can proceed to work out if Origami has issues as per HoloSheep's suggestion - though I've yet to work out where a setHRTF.cs script is attached in its assets.

    Right now, I suspect my original problem may have been multiple (minimized) instances of VS open on the project at one time and that might have prevented the Unity project's Temp/StagingArea folder from being managed properly during builds. Just hunches at this time.

Sign In or Register to comment.