Search Results for

    Show / Hide Table of Contents
    4.4.2 Audio Device Redirection (Windows only)

    Currently only the Windows plugin has support for audio manipulation beyond the standard volume and stereo panning.

    Some VR systems such as the Oculus Rift and HTC Vive have their own audio output device and one needs to redirect audio to these devices instead of the system default audio device. Unity does this automatically for its internal audio, but AVPro Video renders to the system default audio device.

    This issue can be solved by either using the AudioOutput component (see next section). This component redirects the audio to be rendered by Unity and so it goes to the correct device. AudioOutput requires that the Media Foundation video API be used, so if you need to use the DirectShow API you can specify the name of the output device manually in the field “Force Audio Output Device”:

    alt_text

    The device name to use can be retrieved from the VR API or hard coded. For Oculus Rift the name is usually “Rift Audio” or “Headphones (Rift Audio)” and for HTC Vive it is “HTC VIVE USB Audio”. The Facebook Audio 360 audio output option on Windows also allows you to specify a specific audio output device name, but this requires that the your audio is encoded with the Opus codec.

    4.4.3 Audio Spatialisation (Windows only)

    Audio needs to rotate as the user moves their head in the virtual world. This can be achieved by using the AudioOutput component which redirects the audio from the video into Unity (via Unity’s AudioListener).

    alt_text

    This component should be stacked above its required AudioSource component. \

    AudioOutput requires that the video API is set to Media Foundation and that the “Use Unity Audio” tickbox is selected.

    alt_text

    For proper 3D audio placement you will also need to add a spatialiser plugin to the Unity Audio Settings screen (in Unity 5.4 and above) and tick the “spatialize” tickbox on the Audio Source. Multiple instances of AudioOutput component can be created, each one outputting a different audio channel from a different world position.

    If Unity Audio is enabled but the Stereo checkbox is not selected, AVProVideo will try to detect how many channels the video has, and send to Unity as many channels as requested. To get all audio channels, make sure that the default speaker mode in the Unity Audio Settings supports enough channels, and ensure that the OS audio sound settings are in the correct speaker mode (otherwise Unity will just default to the maximum number of supported channels). If the Stereo box is checked, the audio will get resampled to 2 channels.

    If you wish to only get specific channels from the video, you can choose to mask the channels using the AudioOutput component.

    4.4.4 Audio Channel Remapping (Windows only)

    alt_text

    The AudioOutput and AudioChannelMixer components allow the ability to route different audio channels from the media to different physical channels. If you set Audio Output Mode to Single then the audio from a specific channel will be duplicated to all other channels. For best results make sure your video only has mono audio. You can then use the AudioChannelMixer component to control which speaker the audio goes to.

    In This Article