Hololight Stream for Unity core component - Audio
Audio
Audio streaming allows you to stream the audio from your Hololight Stream Unity application to a connected Hololight Stream Client device. If your application has sound effects or music, audio streaming makes it possible to hear those on the client device. You can use the example Unity scene included with Hololight Stream to learn how to get started using Unity audio streaming yourself.
For more information about audio in Unity, check out Unity’s page on the Audio Source component.
| The audio stream system only supports mono or stereo sound, 48 kHz sampling rate, and a DSP buffer size of 256, 512 or 1024 bits. |
Example
The example in the Hololight Stream examples package uses a single audio source with basic functionality, but multiple audio sources with more complicated configurations also work.
-
Add the Hololight Stream Examples package into your Unity project using the Package Manager if you haven’t already.
-
Using Package Manager, select Hololight Stream Examples > Samples.
-
Import the example, Audio Stream Sample.
-
Select Hololight Stream Examples.
-
Add an Audio Listener to the Main Camera, if the Main Camera doesn’t already have one.
-
In the Project window navigate to Assets > Samples > Hololight Stream Examples > 2025.0.0 > Audio Stream Sample.
-
Add the AudioStreamer.cs component to the Main Camera.
-
Add the AudioStreamExample Prefab to the scene.
-
Expand the AudioStreamExample GameObject and select the StaticAudioSource child GameObject.
-
In the Inspector go to the AudioSource component and add an AudioClip.