AudioService Type
The MonoGame-backed IAudio: pipeline/loose-file sound and music registration, an 8-instance ring per sound, the single MediaPlayer music channel, 3D audio, and the fade state machine driven by IAudio.Tick.
Register entries right after the host registers the service (the
MonoGameProgram.withBank builder does this for MVU programs) — the
assets load at that point, before user init runs. A missing
pipeline asset throws there, at startup, where a configuration mistake
belongs.
Fades interpolate the music channel volume through the Core Fade.volume helper. A fade to (or below) zero stops the music when it completes. The volume a fade-in returns to is the last one passed to AudioService.SetMusicVolume (1.0 if never set). A newly started track cancels any running fade and starts at that same volume — a fade-out ends the track that was playing, it is not a sticky volume.
Constructors
| Constructor |
Description
|
|
|
Instance members
| Instance member |
Description
|
Full Usage:
this.Dispose
|
Disposes the instance ring and the loose-file sounds and songs. Pipeline assets stay owned by the ContentManager. |
|
|
|
|
Full Usage:
this.Tick
Parameters:
float32
-
Elapsed seconds since the last frame.
|
Advances music fades and 3D re-attenuation by one frame. The host calls this every frame; calling it yourself double-steps the fades.
|
Mibo