Table of Contents

Class VirtualAudioWriter

Namespace
VisioForge.Core.VirtualCamera.Push
Assembly
VisioForge.Core.dll

Pushes raw PCM audio samples to the VisioForge Virtual Audio Card via shared memory, bypassing DirectShow completely. The virtual audio card source filter reads these samples and presents them as a microphone input to consumer applications.

public sealed class VirtualAudioWriter : IDisposable

Inheritance

Implements

Inherited Members

Constructors

VirtualAudioWriter(int, int, int, string, BaseContext)

Creates a new virtual audio writer.

public VirtualAudioWriter(int sampleRate, int channels, int bitsPerSample, string streamName, BaseContext context)

Parameters

sampleRate int

Sample rate in Hz (e.g., 48000).

channels int

Number of channels (1=mono, 2=stereo).

bitsPerSample int

Bits per sample (typically 16).

streamName string

Shared memory stream name. Default matches the virtual audio card filter.

context BaseContext

SDK logging context. May be null (falls back to Trace).

Properties

BytesWritten

Total bytes of audio data pushed since Start().

public long BytesWritten { get; }

Property Value

long

Methods

Dispose()

Releases all resources used by the VisioForge.Core.VirtualCamera.Push.VirtualAudioWriter, sending an EOS signal to the virtual audio card before closing shared memory.

public void Dispose()

PushSamples(ReadOnlySpan<byte>)

Pushes raw PCM audio data. Size must be a multiple of blockAlign (channels * bitsPerSample / 8). Timestamps are calculated automatically based on accumulated bytes.

public bool PushSamples(ReadOnlySpan<byte> pcmData)

Parameters

pcmData ReadOnlySpan<byte>

Returns

bool

Start()

Opens shared memory and signals that streaming is starting. Must be called before PushSamples.

public void Start()

Stop()

Signals end of stream and stops writing.

public void Stop()