FS.GG.Audio.Host
0.2.0
Prefix Reserved
See the version list below for details.
dotnet add package FS.GG.Audio.Host --version 0.2.0
NuGet\Install-Package FS.GG.Audio.Host -Version 0.2.0
<PackageReference Include="FS.GG.Audio.Host" Version="0.2.0" />
<PackageVersion Include="FS.GG.Audio.Host" Version="0.2.0" />
<PackageReference Include="FS.GG.Audio.Host" />
paket add FS.GG.Audio.Host --version 0.2.0
#r "nuget: FS.GG.Audio.Host, 0.2.0"
#:package FS.GG.Audio.Host@0.2.0
#addin nuget:?package=FS.GG.Audio.Host&version=0.2.0
#tool nuget:?package=FS.GG.Audio.Host&version=0.2.0
FS.GG.Audio.Host
The device seam of the FS.GG.Audio component. It turns the
pure AudioEffect values of
FS.GG.Audio.Core into playback through a
narrow IAudioBackend interface, with two implementations: a deterministic Null/record backend
(the default, and the one CI runs against) and a real OpenAL backend on Silk.NET that degrades to
Null when no device is present.
Game-facing code holds an IAudioBackend and never names a concrete backend type.
Install
dotnet add package FS.GG.Audio.Host
Quick start
open FS.GG.Audio.Core
open FS.GG.Audio.Host
// Headless / test: records requests, opens no device.
let backend = NullBackend.create ()
Audio.play (backend :> IAudioBackend) [ Audio.playSfx (SoundId "jump") 0.8 ]
backend.Evidence.Requested // = the batch, volumes normalized
// Real device: the product supplies the id -> PCM mapping.
let resolver =
{ ResolveSound = fun (SoundId id) -> loadWav $"sfx/{id}.wav"
ResolveTrack = fun (TrackId id) -> loadWav $"music/{id}.wav" }
use device = OpenAlBackend.create resolver // falls back to Null if no device
Surface
IAudioBackend—Play: AudioEffect -> unit, plusIDisposable. Never throws; a backend that cannot act degrades to a no-op.IMixingBackend— optional extension (SetBusGain,SetListener,PlayAt) thatFS.GG.Audio.Enginefeature-detects for continuous mixing and 3D. Backends implementing onlyIAudioBackendremain valid.NullBackend.create— the record-only backend; itsEvidenceequalsCore.Audio.interpretof the same batch.OpenAlBackend.create— opens an OpenAL device, or logs the reason and returns a Null backend. The result is always usable, never null, and never throws into game code.AssetResolver— caller-suppliedSoundId/TrackId→ WAV bytes. An unresolved id is a recorded no-op, not a throw.Wav.tryParse— a total, device-free minimal PCM WAV reader; returnsNoneon anything it does not understand.
Determinism
NullBackend is the default backend under test: no device is opened and the recorded evidence is
the assertion surface. The OpenAL path is exercised only behind an opt-in manual lane, never in the
CI assertion path.
License
MIT — see LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- FS.GG.Audio.Core (>= 0.2.0)
- FSharp.Core (>= 10.1.301)
- Silk.NET.OpenAL (>= 2.23.0)
- Silk.NET.OpenAL.Soft.Native (>= 1.23.1)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on FS.GG.Audio.Host:
| Package | Downloads |
|---|---|
|
FS.GG.Audio.Engine
Mixing/voice layer over FS.GG.Audio.Host — named buses, linear/equal-power fades and cross-fades, side-chain ducking, and 3D listener/emitter positioning, realized through the IAudioBackend seam (IMixingBackend when available) with a deterministic device-free record path. Depends on FS.GG.Audio.Host/.Core only; never on FS.GG.UI. Depends on FS.GG.Audio.Host, so it also redistributes the OpenAL Soft native library (LGPL-2.0-or-later) as a separate, dynamically-linked, replaceable shared library — see THIRD-PARTY-NOTICES.md in this package. |
|
|
FS.GG.Audio.Elmish
Elmish Cmd authoring surface over FS.GG.Audio.Host/.Engine — Audio.Cmd.playSfx/playMusic/stopMusic/setMasterVolume produce Elmish commands that play straight through an IAudioBackend (no mixing), while Audio.Cmd.ofEngine routes a batch through FS.GG.Audio.Engine so bus volume, ducking, and 3D positioning apply. Depends on Elmish (MIT), never on FS.GG.UI. Depends on FS.GG.Audio.Host, so it also redistributes the OpenAL Soft native library (LGPL-2.0-or-later) as a separate, dynamically-linked, replaceable shared library — see THIRD-PARTY-NOTICES.md in this package. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.4.0 | 229 | 7/21/2026 |
| 0.3.0 | 1,008 | 7/16/2026 |
| 0.2.0 | 2,165 | 7/11/2026 |
| 0.1.0 | 2,661 | 7/9/2026 |
| 0.1.0-preview.1 | 81 | 7/7/2026 |