ChannelBuffer
Represents a multi-channel audio buffer, allowing channel/frame-based access to the audio samples.
Read time 1 minuteLast updated 5 days ago
Definition
- Type: Struct
- Namespace: UnityEngine.Audio
- Assembly: UnityEngine.AudioModule
public ref struct ChannelBuffer
Remarks
A ChannelBuffer provides a uniform interface for audio processing code regardless of how the samples are stored, internally. When using such a buffer together with Unity APIs, Unity will interpret the buffer layout as get/set through the indexer.
Constructors
Constructor | Description |
|---|---|
| ChannelBuffer(System.Span{System.Single},System.Int32) | Creates a new ChannelBuffer instance using the |
Properties
Property | Description |
|---|---|
| channelCount | Gets the number of audio channels represented in the buffer. |
| frameCount | Gets the number of frame indices available in the buffer. |
| this[] | Gets or sets the sample value at the specified channel and frame. |
Methods
Method | Description |
|---|---|
| Clear | Sets all samples in the buffer to zero. |