Vixen
02b45cc4
csharp
public sealed class NetworkAudioCaptureSystem

Reads what a sound is doing into the component the wire carries.

No guide page documents this yet — the page shows what the code says about itself.

As a system

Phase
PreRender

Remarks

Before the audio system, which runs in PostRender and is what writes Playback back to Stopped when a sound runs out on its own. Reading in PreRender therefore publishes the state the game asked for in this frame rather than last frame's, and the natural end of a sound reaches the wire on the tick after it happens — which is a frame, and is the right side of the trade against publishing a start the game has not made yet.

Fields and properties (5)

  • public SystemAccess Access

    What this system reads and writes.

  • public NetworkRulesRegistry? Rules

    Who decides what, and who this peer is. Null is server-authoritative.

  • public PlayerId Local

    Which player this peer is, or None for a server.

  • public long PublishedCount

    How many sounds have been published.

  • public long TriggeredCount

    How many re-triggers have gone out.

Methods (3)

  • public override JobHandle Update(in SystemContext context, JobHandle dependency)

    Runs the system.

  • public void Publish(World world)

    Reads every networked sound this peer decides.

  • public bool IsAuthority(NetworkId id)

    Whether this peer decides what a sound is doing.

Used by (1)

  • NetworkAudioTestsVixen.Net.Audio.Tests