Ctrl+K

SoundStream

Declaration

public abstract class Strawberry.Sound.SoundStream

A sound stream that can be used to play a sound

Inherits: Strawberry.DisposableReferenceObject

Properties

SoundManager abstract

The SoundManager using which the buffer is created.

ISoundManager SoundManager { get }

BitsPerSample abstract

Gets the bits per sample of the audio

int BitsPerSample { get }

SampleRate abstract

Gets the sample rate of the audio

int SampleRate { get }

Channels abstract

Gets the number of channels in the audio. 1 for mono, 2 for stereo

int Channels { get }

IsLoop abstract

Gets whether the stream is looping

bool IsLoop { get }

Seconds abstract

Gets the length of the stream in seconds

float Seconds { get }

Volume abstract

Gets or sets the volume of the stream

float Volume { get set }

CurrentPlayTime abstract

Gets or sets the current play time of the stream in seconds

float CurrentPlayTime { get set }

Methods

Play abstract

Plays the stream

void Play(bool loop = false)

Parameters:

Name Type Description
loop System.Boolean = false If true, the stream will loop

Resume abstract

Resumes the stream

void Resume()

Stop abstract

Stops the stream

void Stop()

Pause abstract

Pauses the stream

void Pause()

IsStreaming abstract

Returns true if the stream is playing

bool IsStreaming()

Returns: The state of the stream. True if playing, false otherwise

IsPaused abstract

Returns true if the stream is paused, false otherwise

bool IsPaused()

Returns: The state of the stream. True if paused, false otherwise

Update abstract

Reads the stream and returns true if it is still streaming, false otherwise

bool Update()

Returns: True if the stream is still streaming, false otherwise