Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetAudioSampleProvider(VideoPlayer, ushort)

Return the AudioSampleProvider for the specified track, used to receive audio samples during playback.
Read time 1 minuteLast updated 12 days ago

Definition

public static AudioSampleProvider GetAudioSampleProvider(this VideoPlayer vp, ushort trackIndex)

Parameters

The "this" pointer for the extension method.

trackIndex

The audio track index for which the sample provider is queried.

Returns

Type

Description

AudioSampleProviderThe sample provider for the specified track.

Remarks

The sample provider can only be obtained when VideoPlayer.audioOutputMode is set to VideoAudioOutputMode.APIOnly.