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
IAudioPlaybackHandle.cs
1namespace Gondwana.Audio;
2
8public interface IAudioPlaybackHandle : IDisposable
9{
13 event EventHandler? PlaybackCompleted;
14
19
23 TimeSpan CurrentTime { get; }
24
28 TimeSpan Duration { get; }
29
33 bool IsLooping { get; set; }
34
38 float Volume { get; set; }
39
43 float Pan { get; set; }
44
48 float PlaybackSpeed { get; set; }
49
54 string? TemporaryFilePath { get; }
55
61 void Play(bool fromStart = true);
62
66 void Pause();
67
71 void Resume();
72
77 void Seek(TimeSpan position);
78
82 void Stop();
83}
Backend-provided playback handle used by AudioResource. Implements IDisposable to allow releasing any...
void Seek(TimeSpan position)
Seek to the specified position within the resource.
AudioPlaybackState State
Gets the current playback state.
float Volume
Gets or sets the playback volume. Expected range is implementation-defined (commonly 0....
bool IsLooping
Gets or sets whether playback should loop when reaching the end.
string? TemporaryFilePath
If the backend created a temporary file for playback (for example when streaming or converting),...
EventHandler? PlaybackCompleted
Raised when playback has reached the end (and is not looping) or otherwise completes.
TimeSpan Duration
Gets the total duration of the loaded audio resource.
float Pan
Gets or sets the stereo pan. Expected range is implementation-defined (commonly -1....
TimeSpan CurrentTime
Gets the current playback position.
void Resume()
Resume playback after a pause.
void Pause()
Pause playback. Calling Resume should continue from the paused position.
float PlaybackSpeed
Gets or sets the playback speed multiplier (1.0 = normal speed).
void Play(bool fromStart=true)
Start playback. If fromStart is true, playback will begin from the start of the resource; otherwise ...
void Stop()
Stop playback and reset the current position to the start.
AudioPlaybackState
Describes the current playback state of an audio resource without exposing backend-specific playback ...