API ReferenceSandbox.Audio

MixBufferclass

Contains 512 samples of audio data, this is used when mixing a single channel

object→MixBuffer
Namespace
Sandbox.Audio
Assembly
Sandbox.Engine
Declaration
public sealed class Sandbox.Audio.MixBuffer

Constructors1

Showing 1 constructors

Methods8

Showing 8 methods

public void CopyFrom(Sandbox.Audio.MixBuffer other)PUBLIC

Set this buffer to this value

ParameterTypeDescription
otherMixBuffer—
Returns:void—

public virtual sealed void Dispose()PUBLICVIRTUAL

Returns:void—

public void HardLimit()PUBLIC

Clamp each sample to [-1, 1] to prevent digital clipping from multiple voices accumulating.

Returns:void—

public void RandomFill()PUBLIC

Returns:void—

public void Scale(float volume)PUBLIC

Scale the buffer by volume

ParameterTypeDescription
volumefloat—
Returns:void—

public void Silence()PUBLIC

Silence this buffer

Returns:void—

Properties2

Showing 2 properties

public float Sandbox.Audio.MixBuffer.LevelAvg { get; set; }PUBLICGETSET

Returns:float—

public float Sandbox.Audio.MixBuffer.LevelMax { get; set; }PUBLICGETSET

Returns:float—

On this page