docs.unity3d.com
    目次を表示する/隠す

    Class AudioStreamTrack

    Inheritance
    Object
    RefCountedObject
    MediaStreamTrack
    AudioStreamTrack
    Inherited Members
    MediaStreamTrack.Enabled
    MediaStreamTrack.ReadyState
    MediaStreamTrack.Kind
    MediaStreamTrack.Id
    MediaStreamTrack.Stop()
    RefCountedObject.disposed
    Namespace: Unity.WebRTC
    Syntax
    public class AudioStreamTrack : MediaStreamTrack, IDisposable

    Constructors

    AudioStreamTrack()

    Declaration
    public AudioStreamTrack()

    AudioStreamTrack(AudioListener)

    Declaration
    public AudioStreamTrack(AudioListener listener)
    Parameters
    Type Name Description
    AudioListener listener

    AudioStreamTrack(AudioSource)

    Declaration
    public AudioStreamTrack(AudioSource source)
    Parameters
    Type Name Description
    AudioSource source

    Properties

    Loopback

    This flag only works on sender side track. If True, Send audio input to remote and Play audio in local. If False, only send to remote. Not play audio in local.

    Declaration
    public bool Loopback { get; set; }
    Property Value
    Type Description
    Boolean

    Source

    Declaration
    public AudioSource Source { get; }
    Property Value
    Type Description
    AudioSource

    Methods

    Dispose()

    Declaration
    public override void Dispose()
    Overrides
    MediaStreamTrack.Dispose()

    SetData(Single[], Int32, Int32)

    Declaration
    public void SetData(float[] array, int channels, int sampleRate)
    Parameters
    Type Name Description
    Single[] array
    Int32 channels
    Int32 sampleRate

    SetData(NativeArray<Single>.ReadOnly, Int32, Int32)

    Declaration
    public void SetData(NativeArray<float>.ReadOnly nativeArray, int channels, int sampleRate)
    Parameters
    Type Name Description
    NativeArray.ReadOnly<> nativeArray
    Int32 channels
    Int32 sampleRate

    SetData(NativeSlice<Single>, Int32, Int32)

    Declaration
    public void SetData(NativeSlice<float> nativeSlice, int channels, int sampleRate)
    Parameters
    Type Name Description
    NativeSlice<Single> nativeSlice
    Int32 channels
    Int32 sampleRate

    Events

    onReceived

    Declaration
    public event AudioReadEventHandler onReceived
    Event Type
    Type Description
    AudioReadEventHandler
    トップに戻る
    Copyright © 2023 Unity Technologies
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on Wednesday, November 1, 2023