Table of Contents

Class DeviceMonitor

Namespace
VAST.Capture
Assembly
VAST.Common.dll

Capture device monitor and sound meter

public class DeviceMonitor : IDisposable
Inheritance
DeviceMonitor
Implements
Inherited Members

Constructors

DeviceMonitor(string, AudioCaptureMode, bool[])

Creates new instance of DeviceMonitor

public DeviceMonitor(string audioDeviceId, AudioCaptureMode captureMode, bool[] channelFilter = null)

Parameters

audioDeviceId string

Audio device to monitor

captureMode AudioCaptureMode

Capture mode to use for monitoring

channelFilter bool[]

Optional channel filter

DeviceMonitor(string, VideoCaptureMode)

Creates new instance of DeviceMonitor

public DeviceMonitor(string videoDeviceId, VideoCaptureMode captureMode)

Parameters

videoDeviceId string

Video device to monitor

captureMode VideoCaptureMode

Capture mode to use for monitoring

DeviceMonitor(IAudioCaptureSource2, bool[], IReferenceClock)

Creates new instance of DeviceMonitor

public DeviceMonitor(IAudioCaptureSource2 audioSource, bool[] channelFilter = null, IReferenceClock referenceClock = null)

Parameters

audioSource IAudioCaptureSource2

Audio source to monitor

channelFilter bool[]

Optional channel filter

referenceClock IReferenceClock

Optional reference clock for meter synchronization

DeviceMonitor(IVideoCaptureSource2)

Creates new instance of DeviceMonitor

public DeviceMonitor(IVideoCaptureSource2 videoSource)

Parameters

videoSource IVideoCaptureSource2

Video source to monitor

DeviceMonitor(IMediaSource, int, IReferenceClock)

Creates new instance of DeviceMonitor

public DeviceMonitor(IMediaSource audioSource, int streamIndex, IReferenceClock referenceClock = null)

Parameters

audioSource IMediaSource

Audio source to monitor

streamIndex int

Index of the audio stream to monitor

referenceClock IReferenceClock

Optional reference clock for meter synchronization

Properties

CurrentChannelMeter

Gets the current meter levels for each individual channel.

public float[] CurrentChannelMeter { get; }

Property Value

float[]

CurrentMeter

Gets the current averaged meter level across all monitored channels.

public float CurrentMeter { get; }

Property Value

float

CurrentState

Gets the current state of the capture device.

public CaptureDeviceState CurrentState { get; }

Property Value

CaptureDeviceState

DeviceId

Gets the identifier of the device being monitored.

public string DeviceId { get; }

Property Value

string

Methods

Dispose()

Releases all native resources associated with current object

public void Dispose()

Start()

Starts device monitor

public void Start()

Stop()

Stops device monitor

public void Stop()

Events

ChannelMeterUpdated

Channel meter has been updated. For audio devices invoked on regular basis for every captured frame. For video devices is never called.

public event EventHandler<float[]> ChannelMeterUpdated

Event Type

EventHandler<float[]>

MeterUpdated

Meter has been updated. For audio devices invoked on regular basis for every captured frame. For video devices is never called.

public event EventHandler<float> MeterUpdated

Event Type

EventHandler<float>

StateChanged

Device state changed. First time invoked on start and then only when device state changes.

public event EventHandler<CaptureDeviceState> StateChanged

Event Type

EventHandler<CaptureDeviceState>