Gondwana Game Engine Development (master) - 2.7.0
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
AudioResourceDefinition.cs
1using System.ComponentModel;
2
3namespace Gondwana.Audio.GSND;
4
8public sealed class AudioResourceDefinition
9{
13 [Category("Identity")]
14 [Description("Unique resource name used by the audio system to find and play this sound.")]
15 public string Key { get; set; } = string.Empty;
16
20 [Category("Source")]
21 [Description("Where the audio is loaded from: a loose file, an entry in a GAF package, or a URI.")]
23
25 [Category("Source")]
26 [Description("Audio file location for a loose-file source, normally relative to the GSND document.")]
27 public string? FilePath { get; set; }
28
30 [Category("Source")]
31 [Description("GAF package file containing the audio, normally relative to the GSND document.")]
32 public string? AssetsFilePath { get; set; }
33
35 [Category("Source")]
36 [Description("Name of the audio entry inside the selected GAF package.")]
37 public string? AssetEntryName { get; set; }
38
40 [Category("Source")]
41 [Description("URI used to fetch audio when SourceKind selects a URI source.")]
42 public string? SourceUri { get; set; }
43
45 [Category("Source")]
46 [Description(
47 "Optional format hint such as .wav or .ogg; needed for packed sources whose entry name has no file extension.")]
48 public string? SourceExtension { get; set; }
49
53 [Category("Playback")]
54 [Description(
55 "Playback volume multiplier. 1 is the original level; 0 is silent; values between 0 and 1 are quieter.")]
56 public float Volume { get; set; } = 1.0f;
57
61 [Category("Playback")]
62 [Description("Stereo balance. -1 favors the left channel, 0 centers, and +1 favors the right channel.")]
63 public float Pan { get; set; }
64
68 [Category("Playback")]
69 [Description("Rate multiplier for playback. 1 is normal speed; below 1 is slower; above 1 is faster.")]
70 public float PlaybackSpeed { get; set; } = 1.0f;
71
75 [Category("Playback")]
76 [Description("Whether the sound automatically restarts after reaching its end.")]
77 public bool IsLooping { get; set; }
78}
Defines one named audio resource in a GSND file.
bool IsLooping
Gets or sets whether playback repeats when it reaches the end.
string? AssetEntryName
Audio entry name inside a packed GAF source.
string? SourceUri
Source URI for URI-backed audio.
float Volume
Gets or sets the playback volume.
string? AssetsFilePath
GAF path for a packed audio source, preferably relative to the GSND file.
string? SourceExtension
Optional format hint such as .wav or .ogg, required when a packed entry name has no extension.
AudioResourceSourceKind SourceKind
Gets or sets the source kind.
string? FilePath
Loose audio file path, preferably relative to the GSND file.
float PlaybackSpeed
Gets or sets the playback speed multiplier.
AudioResourceSourceKind
Identifies how a GSND audio resource locates its underlying media.