Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

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.

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, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.
Options

Hololens sound in Unity app

I currently have a unity app with XAML UWP build type that streams the video and sound captured by the hololens to a remote client. My issue is that I would like for the person wearing the hololens to be able to hear what the remote client is saying, but I have not been able to figure it out. I don't necessarily need to have the sound be part of the unity world, just to be able to make the headphones? have the proper output would be enough.

Here is my attempt to get the audio to play. This code in not in Unity but packaged as another project within the solution file.

        async void Device_IncomingConnectionArrived(object sender, IncomingConnectionEventArgs e)
        {

            e.Accept();
            await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, (() =>
            {
                activated = true;
                var remoteAddress = e.RemoteUrl;

                Interlocked.Exchange(ref isTerminator, 0);

                if (!((bool)roleIsActive))
                {
                    playAudio.RealTimePlayback = true;

                    Uri source = new Uri(remoteAddress);
                    playAudio.Source = MediaSource.CreateFromUri(source);
                    playAudio.Play();

                }

            }));

        }

Is there a better way to play audio over the hololens speakers?

Tagged:
Sign In or Register to comment.