API ReferenceSandbox.Audio

MultiChannelBufferclass

Holds up to 8 mix buffers, which usually represent output speakers.

objectMultiChannelBuffer
Namespace
Sandbox.Audio
Assembly
Sandbox.Engine
Declaration
public sealed class Sandbox.Audio.MultiChannelBuffer

Constructors1

Showing 1 constructors

public MultiChannelBuffer(int channelCount = 8)PUBLICCONSTRUCTOR

ParameterTypeDescription
channelCount = 8int

Methods9

Showing 9 methods

public void CopyFromUpmix(Sandbox.Audio.MultiChannelBuffer other)PUBLIC

Copies from one buffer to the other. If the other has less channels, we'll upmix

ParameterTypeDescription
otherMultiChannelBuffer
Returns:void

public virtual sealed void Dispose()PUBLICVIRTUAL

Delete and release all resources. Cannot be used again.

Returns:void

public void HardLimit()PUBLIC

Clamp each sample to [-1, 1] across all channels to prevent digital clipping.

Returns:void

public void MixFrom(Sandbox.Audio.MultiChannelBuffer samples, float mix)PUBLIC

Mix the target buffer into this buffer

ParameterTypeDescription
samplesMultiChannelBuffer
mixfloat
Returns:void

public void Scale(float volume)PUBLIC

Scale volume of this buffer

ParameterTypeDescription
volumefloat
Returns:void

public void Silence()PUBLIC

Silence all buffers

Returns:void

Properties1

Showing 1 properties

public int Sandbox.Audio.MultiChannelBuffer.ChannelCount { get; set; }PUBLICGETSET

How many channels do we have

Returns:int

On this page