docs.unity3d.com
    Show / Hide Table of Contents

    Struct SampleBuffer

    Represents a block of sample frames in a specific data format.

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    ValueType.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.Audio
    Syntax
    public struct SampleBuffer

    Properties

    Channels

    Gets the channels for the sound held in the buffer.

    Declaration
    public readonly int Channels { get; }
    Property Value
    Type Description
    Int32

    Samples

    Gets the number of sample frames stored in the buffer.

    Declaration
    public int Samples { get; }
    Property Value
    Type Description
    Int32

    Methods

    GetBuffer(Int32)

    Provides access to the sample buffer which provides access to the actual sample data of the buffer.

    Declaration
    public NativeArray<float> GetBuffer(int channelIndex)
    Parameters
    Type Name Description
    Int32 channelIndex

    The channel to get the sample buffer for

    Returns
    Type Description
    NativeArray<Single>
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • 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 18 October 2023