Skip to content

Monitoring

Axwabo edited this page Sep 3, 2025 · 2 revisions

Monitoring Audio Output

Implement the IAudioPacketMonitor interface to monitor the output of an audio player

It defines two methods:

  • OnRead(ReadOnlySpan<float>) - when at least 1 sample was read
  • OnEmpty() - when no samples were read

The buffer's length is the amount of samples that were read, you can operate on the whole span.

Output monitoring is independent of the sample provider. It can be used e.g. for visualizing audio

The monitor is not affected by MasterAmplification

Note

The ReadOnlySpan struct can be found in mscorlib.dll (server assemblies). Add <DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences> to your csproj and reference it.

Getting Started

Playing Audio

Advanced

Audio Processors

v1 Guides

Caution

v1 will be out of support soon.

Clone this wiki locally