Skip to content
This repository has been archived by the owner on Mar 22, 2022. It is now read-only.

Hololens 2: RemoteAudioTrack.cs: OutputToDevice property does not mute native sound #849

Open
tettogreen opened this issue Jan 26, 2022 · 0 comments

Comments

@tettogreen
Copy link

tettogreen commented Jan 26, 2022

Description
Default implementation of PeerConnection.cs implies muting of Hololens 2 native sound:

        private void CreateNativePeerConnection()
        {
            // Create the peer connection managed wrapper and its native implementation
            _nativePeer = new WebRTC.PeerConnection();

            _nativePeer.AudioTrackAdded +=
                (RemoteAudioTrack track) =>
                {
                    // Tracks will be output by AudioReceivers, so avoid outputting them twice.
                    track.OutputToDevice(false);
                };
        }

However it doesn't - as a result by default application plays sound both from native audio and from AudioSource components in the scene.

Important Note:
This function works as expected on the PC - no duplicated sounds are played together.

Environment

MRTK version: 2.7.2.0
Platform: UWP
Architecture: ARM
Unity version: 2020.3.25
Target device: HoloLens 2

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant