Struct SampleBuffer
Represents a block of sample frames in a specific data format.
Inherited Members
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> |