This component is required when the audio output mode is set to Unity. It handles retrieving the audio data from the plugin via
OnAudioFilterRead() and playing it in Unity through an
AudioSource component. The number of audio channels that are processed will depend on the Audio settings in Unity and the number of channels in the media. For best performance and latency the sample rate of your audio should match that of Unity.
|MediaPlayer||The MediaPlayer component to retrieve audio from|
|AudioOutputMode||Selects the mode for how audio channels are rendered.
OneToAllChannels: will take a single audio channel and copy it to all the output audio channels. This can be useful when used with the AudioChannelMixer to pan audio across speakers.
MultipleChannels: Allows selection of which channels to play back (default is all).
|Support Positional Audio||When the
You can retrieve the
AudioSource component that is being used by the MediaPlayer by using the
AudioSource property in the MediaPlayer.
From the AudioSource you can use methods such as
GetSpectrumData() to create audio visualisations.
If you use the option to support positional audio then reading back the audio via methods such as
GetSpectrumData() will not work