SoundStreamclass

object→SoundStream
Namespace
Sandbox
Assembly
Sandbox.Engine
Declaration
public sealed class Sandbox.SoundStream

Constructors1

Showing 1 constructors

public SoundStream(int sampleRate = 44100, int channels = 1)PUBLICCONSTRUCTOR

ParameterTypeDescription
sampleRate = 44100int—
channels = 1int—

Methods6

Showing 6 methods

public void Close()PUBLIC

Close the stream: signals that no more data will be written. Once the internal buffer drains, `Sandbox.SoundHandle.IsPlaying` will become `false`.

Returns:void—

public virtual sealed void Dispose()PUBLICVIRTUAL

Returns:void—

public void WriteData(System.Span`1<short> data)PUBLIC

ParameterTypeDescription
dataSpan<short>—
Returns:void—

public int WriteVoiceData(System.ReadOnlySpan`1<byte> data)PUBLIC

ParameterTypeDescription
dataReadOnlySpan<byte>—
Returns:int—

Properties5

Showing 5 properties

public int Sandbox.SoundStream.Channels { get; set; }PUBLICGETSET

Number of audio channels, as set during its creation.

Returns:int—

public int Sandbox.SoundStream.LatencySamplesCount { get; set; }PUBLICGETSET

Returns:int—

public int Sandbox.SoundStream.MaxWriteSampleCount { get; set; }PUBLICGETSET

Returns:int—

public int Sandbox.SoundStream.QueuedSampleCount { get; set; }PUBLICGETSET

Returns:int—

public int Sandbox.SoundStream.SampleRate { get; set; }PUBLICGETSET

Number of samples per second, as set during its creation.

Returns:int—

On this page