Api Sandbox SoundStream
class

SoundStream

public sealed class SoundStream

Constructors

SoundStream(Int32 sampleRate, Int32 channels)

Properties

Name Type Description
SampleRate Int32 Number of samples per second, as set during its creation.
Channels Int32 Number of audio channels, as set during its creation.
QueuedSampleCount Int32
MaxWriteSampleCount Int32
LatencySamplesCount Int32

Methods

Void WriteData(Span<Int16> data)
Void Close()

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

virtual Void Dispose()
SoundHandle Play(Single volume = 1, Single pitch = 1)

Play sound of the stream.

SoundHandle Play(Single volume, Single pitch, Single decibels)

Play sound of the stream.

Assembly: Sandbox.Engine Namespace: Sandbox Full Name: Sandbox.SoundStream