Gondwana Game Engine Development (master) - 2.6.1
Gondwana is a cross-platform 2.5D game and rendering engine written in C#/.NET 8. It provides fine-grained control over rendering, timing, and scene composition, with built-in support for parallax, z-ordering, pixel overhang, collision detection, and particle effects. Gondwana targets desktop and web platforms using SkiaSharp for graphics and pluggable audio backends for desktop and browser targets.
Loading...
Searching...
No Matches
Gondwana.Audio.IAudioPlaybackHandle Interface Reference

Backend-provided playback handle used by AudioResource. Implements IDisposable to allow releasing any native or temporary resources associated with playback (for example temporary files or native audio handles). More...

Inheritance diagram for Gondwana.Audio.IAudioPlaybackHandle:

Public Member Functions

void Play (bool fromStart=true)
 Start playback. If fromStart is true, playback will begin from the start of the resource; otherwise playback begins from the current position.
void Pause ()
 Pause playback. Calling Resume should continue from the paused position.
void Resume ()
 Resume playback after a pause.
void Seek (TimeSpan position)
 Seek to the specified position within the resource.
void Stop ()
 Stop playback and reset the current position to the start.

Properties

AudioPlaybackState State [get]
 Gets the current playback state.
TimeSpan CurrentTime [get]
 Gets the current playback position.
TimeSpan Duration [get]
 Gets the total duration of the loaded audio resource.
bool IsLooping [get, set]
 Gets or sets whether playback should loop when reaching the end.
float Volume [get, set]
 Gets or sets the playback volume. Expected range is implementation-defined (commonly 0.0 to 1.0).
float Pan [get, set]
 Gets or sets the stereo pan. Expected range is implementation-defined (commonly -1.0 (left) to 1.0 (right)).
float PlaybackSpeed [get, set]
 Gets or sets the playback speed multiplier (1.0 = normal speed).
string? TemporaryFilePath [get]
 If the backend created a temporary file for playback (for example when streaming or converting), returns the file path. Otherwise null.

Events

EventHandler? PlaybackCompleted
 Raised when playback has reached the end (and is not looping) or otherwise completes.

Detailed Description

Backend-provided playback handle used by AudioResource. Implements IDisposable to allow releasing any native or temporary resources associated with playback (for example temporary files or native audio handles).

Definition at line 8 of file IAudioPlaybackHandle.cs.

Member Function Documentation

◆ Pause()

void Gondwana.Audio.IAudioPlaybackHandle.Pause ( )

Pause playback. Calling Resume should continue from the paused position.

◆ Play()

void Gondwana.Audio.IAudioPlaybackHandle.Play ( bool fromStart = true)

Start playback. If fromStart is true, playback will begin from the start of the resource; otherwise playback begins from the current position.

Parameters
fromStartWhether playback should start from the beginning.

◆ Resume()

void Gondwana.Audio.IAudioPlaybackHandle.Resume ( )

Resume playback after a pause.

◆ Seek()

void Gondwana.Audio.IAudioPlaybackHandle.Seek ( TimeSpan position)

Seek to the specified position within the resource.

Parameters
positionThe position to seek to.

◆ Stop()

void Gondwana.Audio.IAudioPlaybackHandle.Stop ( )

Stop playback and reset the current position to the start.

Property Documentation

◆ CurrentTime

TimeSpan Gondwana.Audio.IAudioPlaybackHandle.CurrentTime
get

Gets the current playback position.

Definition at line 23 of file IAudioPlaybackHandle.cs.

◆ Duration

TimeSpan Gondwana.Audio.IAudioPlaybackHandle.Duration
get

Gets the total duration of the loaded audio resource.

Definition at line 28 of file IAudioPlaybackHandle.cs.

◆ IsLooping

bool Gondwana.Audio.IAudioPlaybackHandle.IsLooping
getset

Gets or sets whether playback should loop when reaching the end.

Definition at line 33 of file IAudioPlaybackHandle.cs.

◆ Pan

float Gondwana.Audio.IAudioPlaybackHandle.Pan
getset

Gets or sets the stereo pan. Expected range is implementation-defined (commonly -1.0 (left) to 1.0 (right)).

Definition at line 43 of file IAudioPlaybackHandle.cs.

◆ PlaybackSpeed

float Gondwana.Audio.IAudioPlaybackHandle.PlaybackSpeed
getset

Gets or sets the playback speed multiplier (1.0 = normal speed).

Definition at line 48 of file IAudioPlaybackHandle.cs.

◆ State

AudioPlaybackState Gondwana.Audio.IAudioPlaybackHandle.State
get

Gets the current playback state.

Definition at line 18 of file IAudioPlaybackHandle.cs.

◆ TemporaryFilePath

string? Gondwana.Audio.IAudioPlaybackHandle.TemporaryFilePath
get

If the backend created a temporary file for playback (for example when streaming or converting), returns the file path. Otherwise null.

Definition at line 54 of file IAudioPlaybackHandle.cs.

◆ Volume

float Gondwana.Audio.IAudioPlaybackHandle.Volume
getset

Gets or sets the playback volume. Expected range is implementation-defined (commonly 0.0 to 1.0).

Definition at line 38 of file IAudioPlaybackHandle.cs.

Event Documentation

◆ PlaybackCompleted

EventHandler? Gondwana.Audio.IAudioPlaybackHandle.PlaybackCompleted

Raised when playback has reached the end (and is not looping) or otherwise completes.

Definition at line 13 of file IAudioPlaybackHandle.cs.