![]() |
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.
|
Browser/WASM audio backend implemented with HTML media and Web Audio APIs. More...
Public Member Functions | |||||||||||||
| IAudioPlaybackHandle | CreateFromBytes (string key, byte[] data, string fileNameOrExtension, float volume, float pan, float playbackSpeed) | ||||||||||||
Creates a playback handle from raw audio bytes. The implementation is responsible for interpreting the provided data according to the file hint.
| |||||||||||||
| IAudioPlaybackHandle | CreateFromUri (string key, string uri, float volume, float pan, float playbackSpeed) | ||||||||||||
Creates a playback handle that plays audio from the specified URI. This is intended for backends that can stream or reference remote/local URIs directly (for example browser audio backends).
| |||||||||||||
Properties | |
| static BrowserAudioBackend | Instance = new() [get] |
| Gets the shared instance. | |
| string | Name [get] |
| Gets the human-readable name of the backend implementation. | |
Browser/WASM audio backend implemented with HTML media and Web Audio APIs.
Definition at line 7 of file BrowserAudioBackend.cs.
| IAudioPlaybackHandle Gondwana.Audio.Browser.BrowserAudioBackend.CreateFromBytes | ( | string | key, |
| byte[] | data, | ||
| string | fileNameOrExtension, | ||
| float | volume, | ||
| float | pan, | ||
| float | playbackSpeed ) |
Creates a playback handle from raw audio bytes. The implementation is responsible for interpreting the provided data according to the file hint.
| key | A unique key for the audio resource. |
| data | Raw audio data bytes. |
| fileNameOrExtension | A file name or extension used as a hint for format detection (for example ".wav"). |
| volume | Initial volume (0.0 to 1.0). |
| pan | Initial stereo pan (-1.0 to 1.0). |
| playbackSpeed | Initial playback speed. |
Implements Gondwana.Audio.IAudioBackend.
Definition at line 20 of file BrowserAudioBackend.cs.
| IAudioPlaybackHandle Gondwana.Audio.Browser.BrowserAudioBackend.CreateFromUri | ( | string | key, |
| string | uri, | ||
| float | volume, | ||
| float | pan, | ||
| float | playbackSpeed ) |
Creates a playback handle that plays audio from the specified URI. This is intended for backends that can stream or reference remote/local URIs directly (for example browser audio backends).
| key | A unique key for the audio resource. |
| uri | The URI that identifies the audio resource. |
| volume | Initial volume (0.0 to 1.0). |
| pan | Initial stereo pan (-1.0 to 1.0). |
| playbackSpeed | Initial playback speed. |
Implements Gondwana.Audio.IAudioBackend.
|
staticget |
Gets the shared instance.
Definition at line 14 of file BrowserAudioBackend.cs.
|
get |
Gets the human-readable name of the backend implementation.
Implements Gondwana.Audio.IAudioBackend.
Definition at line 17 of file BrowserAudioBackend.cs.