Version: Unity 6.5 Alpha (6000.5)
LanguageEnglish
  • C#

ChannelBuffer

struct in UnityEngine.Audio

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Represents a multi-channel audio buffer, allowing channel/frame-based access to the audio samples.

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.

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[int,int] Gets or sets the sample value at the specified channel and frame.

Constructors

Constructor Description
ChannelBuffer Creates a new ChannelBuffer instance using the as a backing memory store.

Public Methods

Method Description
Clear Sets all samples in the buffer to zero.