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.Browser.BrowserAudioPlayer Class Referencesealed

Compatibility wrapper around the common AudioResource browser implementation. More...

Public Member Functions

void Play (bool fromStart=true)
 Starts playback.
void Pause ()
 Pauses playback at the current position.
void Resume ()
 Resumes paused playback.
void Seek (TimeSpan position)
 Moves playback to the requested time.
void Stop ()
 Stops playback.

Properties

string Key [get]
 Gets the key.
bool IsPlaying [get]
 Gets whether playback is active.
bool IsPaused [get]
 Gets whether playback is paused.
AudioPlaybackState State [get]
 Gets the state.
TimeSpan CurrentTime [get, set]
 Gets or sets the current playback position.
TimeSpan Duration [get]
 Gets the media duration.
bool IsLooping [get, set]
 Gets or sets whether playback repeats when it reaches the end.
float Volume [get, set]
 Gets or sets the playback volume.
float Pan [get, set]
 Gets or sets the stereo pan.
float PlaybackSpeed [get, set]
 Gets or sets the playback speed multiplier.

Detailed Description

Compatibility wrapper around the common AudioResource browser implementation.

Definition at line 9 of file BrowserAudioPlayer.cs.

Member Function Documentation

◆ Pause()

void Gondwana.Audio.Browser.BrowserAudioPlayer.Pause ( )

Pauses playback at the current position.

◆ Play()

void Gondwana.Audio.Browser.BrowserAudioPlayer.Play ( bool fromStart = true)

Starts playback.

Parameters
fromStartWhether to restart playback from the beginning.

◆ Resume()

void Gondwana.Audio.Browser.BrowserAudioPlayer.Resume ( )

Resumes paused playback.

◆ Seek()

void Gondwana.Audio.Browser.BrowserAudioPlayer.Seek ( TimeSpan position)

Moves playback to the requested time.

Parameters
positionThe requested playback position.

◆ Stop()

void Gondwana.Audio.Browser.BrowserAudioPlayer.Stop ( )

Stops playback.

Property Documentation

◆ CurrentTime

TimeSpan Gondwana.Audio.Browser.BrowserAudioPlayer.CurrentTime
getset

Gets or sets the current playback position.

Definition at line 37 of file BrowserAudioPlayer.cs.

◆ Duration

TimeSpan Gondwana.Audio.Browser.BrowserAudioPlayer.Duration
get

Gets the media duration.

Definition at line 46 of file BrowserAudioPlayer.cs.

◆ IsLooping

bool Gondwana.Audio.Browser.BrowserAudioPlayer.IsLooping
getset

Gets or sets whether playback repeats when it reaches the end.

Definition at line 51 of file BrowserAudioPlayer.cs.

◆ IsPaused

bool Gondwana.Audio.Browser.BrowserAudioPlayer.IsPaused
get

Gets whether playback is paused.

Definition at line 29 of file BrowserAudioPlayer.cs.

◆ IsPlaying

bool Gondwana.Audio.Browser.BrowserAudioPlayer.IsPlaying
get

Gets whether playback is active.

Definition at line 25 of file BrowserAudioPlayer.cs.

◆ Key

string Gondwana.Audio.Browser.BrowserAudioPlayer.Key
get

Gets the key.

Definition at line 21 of file BrowserAudioPlayer.cs.

◆ Pan

float Gondwana.Audio.Browser.BrowserAudioPlayer.Pan
getset

Gets or sets the stereo pan.

Definition at line 69 of file BrowserAudioPlayer.cs.

◆ PlaybackSpeed

float Gondwana.Audio.Browser.BrowserAudioPlayer.PlaybackSpeed
getset

Gets or sets the playback speed multiplier.

Definition at line 78 of file BrowserAudioPlayer.cs.

◆ State

AudioPlaybackState Gondwana.Audio.Browser.BrowserAudioPlayer.State
get

Gets the state.

Definition at line 33 of file BrowserAudioPlayer.cs.

◆ Volume

float Gondwana.Audio.Browser.BrowserAudioPlayer.Volume
getset

Gets or sets the playback volume.

Definition at line 60 of file BrowserAudioPlayer.cs.