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.IAudioBackend Interface Reference

Creates backend-specific playback handles for the engine's common audio API. More...

Inheritance diagram for Gondwana.Audio.IAudioBackend:
Gondwana.Audio.Browser.BrowserAudioBackend Gondwana.Audio.NAudio.NAudioAudioBackend

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

string Name [get]
 Gets the human-readable name of the backend implementation.

Detailed Description

Creates backend-specific playback handles for the engine's common audio API.

Definition at line 6 of file IAudioBackend.cs.

Member Function Documentation

◆ CreateFromBytes()

IAudioPlaybackHandle Gondwana.Audio.IAudioBackend.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.

Parameters
keyA unique key for the audio resource.
dataRaw audio data bytes.
fileNameOrExtensionA file name or extension used as a hint for format detection (for example ".wav").
volumeInitial volume (0.0 to 1.0).
panInitial stereo pan (-1.0 to 1.0).
playbackSpeedInitial playback speed.
Returns
An IAudioPlaybackHandle representing the created playback instance.

Implemented in Gondwana.Audio.Browser.BrowserAudioBackend, and Gondwana.Audio.NAudio.NAudioAudioBackend.

◆ CreateFromUri()

IAudioPlaybackHandle Gondwana.Audio.IAudioBackend.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).

Parameters
keyA unique key for the audio resource.
uriThe URI that identifies the audio resource.
volumeInitial volume (0.0 to 1.0).
panInitial stereo pan (-1.0 to 1.0).
playbackSpeedInitial playback speed.
Returns
An IAudioPlaybackHandle representing the created playback instance.

Implemented in Gondwana.Audio.Browser.BrowserAudioBackend, and Gondwana.Audio.NAudio.NAudioAudioBackend.

Property Documentation

◆ Name

string Gondwana.Audio.IAudioBackend.Name
get

Gets the human-readable name of the backend implementation.

Implemented in Gondwana.Audio.Browser.BrowserAudioBackend, and Gondwana.Audio.NAudio.NAudioAudioBackend.

Definition at line 11 of file IAudioBackend.cs.