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.BrowserAudioManager Class Referencesealed

Compatibility facade for browser audio. New code may use AudioResourceManager directly after calling Engine.UseBrowserAudio(). More...

Public Member Functions

BrowserAudioPlayer Load (string key, string src, float volume, bool loop)
 Retains the original CLR signature for compiled browser clients.
BrowserAudioPlayer Load (string key, string src, float volume=1.0f, bool loop=false, float pan=0.0f, float playbackSpeed=1.0f)
 Loads URI-backed audio and registers a browser player under the supplied key.
void Unload (string key)
 Unloads the keyed audio resource and removes its browser player.
void UnloadAll ()
 Unloads all audio resources tracked by this browser manager.
bool TryGet (string key, out BrowserAudioPlayer? player)
 Attempts to retrieve the browser player registered under the specified key.
BrowserAudioPlayer? Get (string key)
 Gets the browser player registered under the specified key.
bool Contains (string key)
 Determines whether a browser player is registered under the specified key.

Properties

static BrowserAudioManager Instance [get]
 Gets the shared instance.

Detailed Description

Compatibility facade for browser audio. New code may use AudioResourceManager directly after calling Engine.UseBrowserAudio().

Definition at line 11 of file BrowserAudioManager.cs.

Member Function Documentation

◆ Contains()

bool Gondwana.Audio.Browser.BrowserAudioManager.Contains ( string key)

Determines whether a browser player is registered under the specified key.

Parameters
keyThe lookup key for the resource.
Returns
true if a player is registered for the key; otherwise, false.

◆ Get()

BrowserAudioPlayer? Gondwana.Audio.Browser.BrowserAudioManager.Get ( string key)

Gets the browser player registered under the specified key.

Parameters
keyThe lookup key for the resource.
Returns
The registered browser player, or null if the key is absent.

◆ Load() [1/2]

BrowserAudioPlayer Gondwana.Audio.Browser.BrowserAudioManager.Load ( string key,
string src,
float volume,
bool loop )

Retains the original CLR signature for compiled browser clients.

Parameters
keyThe lookup key for the resource.
srcThe URI of the audio source.
volumeThe playback volume.
loopWhether playback repeats at the end.
Returns
The resulting browser audio player.

◆ Load() [2/2]

BrowserAudioPlayer Gondwana.Audio.Browser.BrowserAudioManager.Load ( string key,
string src,
float volume = 1::0f,
bool loop = false,
float pan = 0::0f,
float playbackSpeed = 1::0f )

Loads URI-backed audio and registers a browser player under the supplied key.

Parameters
keyThe lookup key for the resource.
srcThe URI of the audio source.
volumeThe playback volume.
loopWhether playback repeats at the end.
panThe stereo pan, from -1 (left) to 1 (right).
playbackSpeedThe playback speed multiplier.
Returns
The resulting browser audio player.

Definition at line 45 of file BrowserAudioManager.cs.

◆ TryGet()

bool Gondwana.Audio.Browser.BrowserAudioManager.TryGet ( string key,
out BrowserAudioPlayer? player )

Attempts to retrieve the browser player registered under the specified key.

Parameters
keyThe lookup key for the resource.
playerThe registered player when found; otherwise, null.
Returns
true if the player was found; otherwise, false.

◆ Unload()

void Gondwana.Audio.Browser.BrowserAudioManager.Unload ( string key)

Unloads the keyed audio resource and removes its browser player.

Parameters
keyThe lookup key for the resource.

Definition at line 69 of file BrowserAudioManager.cs.

◆ UnloadAll()

void Gondwana.Audio.Browser.BrowserAudioManager.UnloadAll ( )

Unloads all audio resources tracked by this browser manager.

Definition at line 78 of file BrowserAudioManager.cs.

Property Documentation

◆ Instance

BrowserAudioManager Gondwana.Audio.Browser.BrowserAudioManager.Instance
staticget

Gets the shared instance.

Definition at line 24 of file BrowserAudioManager.cs.