PcmOptionsclass

Options for creating a sound from raw PCM data via `Sandbox.SoundFile.FromPcm(System.String,System.Span,Sandbox.SoundFile.PcmOptions)`.

objectPcmOptions
Namespace
global
Assembly
Sandbox.Engine
Declaration
public sealed struct Sandbox.SoundFile.PcmOptions

Constructors1

Showing 1 constructors

public PcmOptions()PUBLICCONSTRUCTOR

Options for creating a sound from raw PCM data via `Sandbox.SoundFile.FromPcm(System.String,System.Span,Sandbox.SoundFile.PcmOptions)`.

Properties6

Showing 6 properties

public int Sandbox.SoundFile.PcmOptions.Bits { get; set; }PUBLICGETSET

Bits per sample (8, 16, or 32).

Returns:int

public int Sandbox.SoundFile.PcmOptions.Channels { get; set; }PUBLICGETSET

Number of channels (1 = mono, 2 = stereo).

Returns:int

public bool Sandbox.SoundFile.PcmOptions.Loop { get; set; }PUBLICGETSET

Whether the sound should loop. Overridden by `Sandbox.SoundFile.PcmOptions.LoopStart`/`Sandbox.SoundFile.PcmOptions.LoopEnd` if set.

Returns:bool

public int Sandbox.SoundFile.PcmOptions.LoopEnd { get; set; }PUBLICGETSET

End sample of the loop region. 0 means end of sound.

Returns:int

public int Sandbox.SoundFile.PcmOptions.LoopStart { get; set; }PUBLICGETSET

Start sample of the loop region. -1 means no loop.

Returns:int

public uint Sandbox.SoundFile.PcmOptions.Rate { get; set; }PUBLICGETSET

Sample rate in Hz (e.g. 44100).

Returns:uint

On this page