reckfellENGINE

AudioStreamPlayback

Meta class for playing back audio.

On this page
class AudioStreamPlaybackReckfellSharpInherits RefCounted

Meta class for playing back audio.

Can play, loop, pause a scroll through audio. See AudioStream and AudioStreamOggVorbis for usage.

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

Constructors1

AudioStreamPlaybackConstructor
# AudioStreamPlayback
C#
public AudioStreamPlayback();

Methods18

GetLoopCountint
# GetLoopCount
C#
public int GetLoopCount();

Overridable method. Should return how many times this audio stream has looped. Most built-in playbacks always return 0.

Returns int
GetPlaybackPositiondouble
# GetPlaybackPosition
C#
public double GetPlaybackPosition();

Overridable method. Should return the current progress along the audio stream, in seconds.

Returns double
GetSamplePlaybackAudioSamplePlayback
# GetSamplePlayback
C#
public AudioSamplePlayback GetSamplePlayback();

Returns the AudioSamplePlayback associated with this AudioStreamPlayback for playing back the audio sample of this stream.

Returns AudioSamplePlayback
IsPlayingbool
# IsPlaying
C#
public bool IsPlaying();

Overridable method. Should return true if this playback is active and playing its audio stream.

Returns bool
MixAudioVector2[]
# MixAudio
C#
public Vector2[] MixAudio(float rateScale, int frames);

Mixes up to frames of audio from the stream from the current position, at a rate of rate_scale, advancing the stream. Returns a Vector2[] where each element holds the left and right channel volume levels of each frame. Note: Can return fewer frames than requested, make sure to use the size of the return value.

Parameters
NameTypeDefault
rateScalefloat—
framesint—
Returns Vector2[]
Seekvoid
# Seek
C#
public void Seek(double time = 0d);

Override this method to customize what happens when seeking this audio stream at the given position, such as by calling AudioStreamPlayer.Seek.

Parameters
NameTypeDefault
timedouble0d
SetSamplePlaybackvoid
# SetSamplePlayback
C#
public void SetSamplePlayback(AudioSamplePlayback playbackSample);

Associates AudioSamplePlayback to this AudioStreamPlayback for playing back the audio sample of this stream.

Parameters
NameTypeDefault
playbackSampleAudioSamplePlayback—
Startvoid
# Start
C#
public void Start(double fromPos = 0d);

Override this method to customize what happens when the playback starts at the given position, such as by calling AudioStreamPlayer.Play.

Parameters
NameTypeDefault
fromPosdouble0d
Stopvoid
# Stop
C#
public void Stop();

Override this method to customize what happens when the playback is stopped, such as by calling AudioStreamPlayer.Stop.

_GetLoopCountint
# _GetLoopCount
C#
public virtual int _GetLoopCount();

Overridable method. Should return how many times this audio stream has looped. Most built-in playbacks always return 0.

Returns int
_GetParameterVariant
# _GetParameter
C#
public virtual Variant _GetParameter(StringName name);

Return the current value of a playback parameter by name (see AudioStream._GetParameterList).

Parameters
NameTypeDefault
nameStringName—
Returns Variant
_GetPlaybackPositiondouble
# _GetPlaybackPosition
C#
public virtual double _GetPlaybackPosition();

Overridable method. Should return the current progress along the audio stream, in seconds.

Returns double
_IsPlayingbool
# _IsPlaying
C#
public virtual bool _IsPlaying();

Overridable method. Should return true if this playback is active and playing its audio stream.

Returns bool
_Seekvoid
# _Seek
C#
public virtual void _Seek(double position);

Override this method to customize what happens when seeking this audio stream at the given position, such as by calling AudioStreamPlayer.Seek.

Parameters
NameTypeDefault
positiondouble—
_SetParametervoid
# _SetParameter
C#
public virtual void _SetParameter(StringName name, Variant value);

Set the current value of a playback parameter by name (see AudioStream._GetParameterList).

Parameters
NameTypeDefault
nameStringName—
valueVariant—
_Startvoid
# _Start
C#
public virtual void _Start(double fromPos);

Override this method to customize what happens when the playback starts at the given position, such as by calling AudioStreamPlayer.Play.

Parameters
NameTypeDefault
fromPosdouble—
_Stopvoid
# _Stop
C#
public virtual void _Stop();

Override this method to customize what happens when the playback is stopped, such as by calling AudioStreamPlayer.Stop.

_TagUsedStreamsvoid
# _TagUsedStreams
C#
public virtual void _TagUsedStreams();

Overridable method. Called whenever the audio stream is mixed if the playback is active and AudioServer.SetEnableTaggingUsedAudioStreams has been set to true. Editor plugins may use this method to "tag" the current position along the audio stream and display it in a preview.

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.