reckfellENGINE

AudioStreamPlaybackPolyphonic

Playback instance for AudioStreamPolyphonic.

On this page
class AudioStreamPlaybackPolyphonicReckfellSharpInherits AudioStreamPlayback

Playback instance for AudioStreamPolyphonic.

Playback instance for AudioStreamPolyphonic. After setting the stream property of AudioStreamPlayer, AudioStreamPlayer2D, or AudioStreamPlayer3D, the playback instance can be obtained by calling AudioStreamPlayer.GetStreamPlayback, AudioStreamPlayer2D.GetStreamPlayback or AudioStreamPlayer3D.GetStreamPlayback methods.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Methods6

IsStreamPlayingbool
# IsStreamPlaying
C#
public bool IsStreamPlaying(long stream);

Returns true if the stream associated with the given integer ID is still playing. Check AudioStreamPlaybackPolyphonic.PlayStream for information on when this ID becomes invalid.

Parameters
NameTypeDefault
streamlong—
Returns bool
PlayStream2 overloads
# PlayStream · 1/2
C#
public long PlayStream(AudioStream stream, float fromOffset, float volumeDb, float pitchScale);

Play an AudioStream at a given offset, volume, pitch scale, playback type, and bus. Playback starts immediately. The return value is a unique integer ID that is associated to this playback stream and which can be used to control it. This ID becomes invalid when the stream ends (if it does not loop), when the AudioStreamPlaybackPolyphonic is stopped, or when AudioStreamPlaybackPolyphonic.StopStream is called. This function returns AudioStreamPlaybackPolyphonic.InvalidId if the amount of streams currently playing equals AudioStreamPolyphonic.Polyphony. If you need a higher amount of maximum polyphony, raise this value.

Parameters
NameTypeDefault
streamAudioStream—
fromOffsetfloat—
volumeDbfloat—
pitchScalefloat—
Returns long
# PlayStream · 2/2
C#
public long PlayStream(AudioStream stream, float fromOffset = 0f, float volumeDb = 0f, float pitchScale = 1f, AudioServer.PlaybackType playbackType = AudioServer.PlaybackType.Default, StringName bus = null);

Play an AudioStream at a given offset, volume, pitch scale, playback type, and bus. Playback starts immediately. The return value is a unique integer ID that is associated to this playback stream and which can be used to control it. This ID becomes invalid when the stream ends (if it does not loop), when the AudioStreamPlaybackPolyphonic is stopped, or when AudioStreamPlaybackPolyphonic.StopStream is called. This function returns AudioStreamPlaybackPolyphonic.InvalidId if the amount of streams currently playing equals AudioStreamPolyphonic.Polyphony. If you need a higher amount of maximum polyphony, raise this value.

Parameters
NameTypeDefault
streamAudioStream—
fromOffsetfloat0f
volumeDbfloat0f
pitchScalefloat1f
playbackTypeAudioServer.PlaybackTypeAudioServer.PlaybackType.Default
busStringNamenull
Returns long
SetStreamPitchScalevoid
# SetStreamPitchScale
C#
public void SetStreamPitchScale(long stream, float pitchScale);

Change the stream pitch scale. The stream argument is an integer ID returned by AudioStreamPlaybackPolyphonic.PlayStream.

Parameters
NameTypeDefault
streamlong—
pitchScalefloat—
SetStreamVolumevoid
# SetStreamVolume
C#
public void SetStreamVolume(long stream, float volumeDb);

Change the stream volume (in db). The stream argument is an integer ID returned by AudioStreamPlaybackPolyphonic.PlayStream.

Parameters
NameTypeDefault
streamlong—
volumeDbfloat—
StopStreamvoid
# StopStream
C#
public void StopStream(long stream);

Stop a stream. The stream argument is an integer ID returned by AudioStreamPlaybackPolyphonic.PlayStream, which becomes invalid after calling this function.

Parameters
NameTypeDefault
streamlong—

Fields and constants1

InvalidIdField
# InvalidId
C#
public const long InvalidId = -1;

Returned by AudioStreamPlaybackPolyphonic.PlayStream in case it could not allocate a stream for playback.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.