# ChannelBuffer(Span<float>, int)

> Creates a new ChannelBuffer instance using the buffer as a backing memory store.

## Definition

* **Type:** Constructor
* **Namespace:** [UnityEngine.Audio](/engine/6000.6/script-reference/unityengine/audio.md)
* **Assembly:** UnityEngine.AudioModule

```csharp
public ChannelBuffer(Span<float> buffer, int channels)
```

### Parameters

**** (\[Span\<float>]\(https\://learn.microsoft.com/dotnet/api/system.span-1)): A span of floats that will work as the backing buffer.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The number of audio channels in the buffer

### Remarks

Setting content using this will be reflected if another [ChannelBuffer](/engine/6000.6/script-reference/unityengine/audio/channelbuffer.md) is created and the same indices are being read back. No other guarantees are given with respect to layout / packing.
