Table of Contents

Class VirtualAudioSourceSettings

Namespace
VisioForge.Core.Types.X.Sources
Assembly
VisioForge.Core.dll

Virtual audio source settings.

public class VirtualAudioSourceSettings : IVideoCaptureBaseAudioSourceSettings, IMediaBlockSettings, IAudioVolumeMute

Inheritance

Implements

Inherited Members

Constructors

VirtualAudioSourceSettings(VirtualAudioSourceSettingsWave, int, int, AudioFormatX)

Initializes a new instance of the VisioForge.Core.Types.X.Sources.VirtualAudioSourceSettings class.

public VirtualAudioSourceSettings(VirtualAudioSourceSettingsWave wave = VirtualAudioSourceSettingsWave.Ticks, int sampleRate = 48000, int channels = 2, AudioFormatX format = AudioFormatX.S16)

Parameters

wave VirtualAudioSourceSettingsWave
sampleRate int

The sample rate.

channels int

The channels.

format AudioFormatX

The format.

Properties

ApplyTickRamp

Apply ramp to tick samples.

public bool ApplyTickRamp { get; set; }

Property Value

bool

Remarks

Default value: false

CanActivatePull

Can activate in pull mode.

public bool CanActivatePull { get; set; }

Property Value

bool

Remarks

Default value: false.

CanActivatePush

Can activate in push mode.

public bool CanActivatePush { get; set; }

Property Value

bool

Remarks

Default value: true.

Channels

Gets or sets the channels.

public int Channels { get; set; }

Property Value

int

Format

Gets or sets the format.

public AudioFormatX Format { get; set; }

Property Value

AudioFormatX

Frequency

Frequency of test signal. The sample rate needs to be at least 2 times higher.

public double Frequency { get; set; }

Property Value

double

Remarks

Default value: 440.

IsLive

Gets or sets a value indicating whether this instance is live.

public bool IsLive { get; set; }

Property Value

bool

MarkerTickPeriod

Make every Nth tick a marker tick (= a tick with different volume). Only used if wave = ticks. 0 = no marker ticks.

public uint MarkerTickPeriod { get; set; }

Property Value

uint

Remarks

Flags: Read / Write Default value: 0

MarkerTickVolume

Volume of marker ticks. Only used if wave = ticks and marker-tick-period is set to a nonzero value.

public double MarkerTickVolume { get; set; }

Property Value

double

Remarks

Flags: Read / Write Default value: 1

SampleRate

Gets or sets the sample rate.

public int SampleRate { get; set; }

Property Value

int

SamplesPerBuffer

Number of samples in each outgoing buffer

public int SamplesPerBuffer { get; set; }

Property Value

int

Remarks

Default value: 1024.

SinePeriodsPerTick

Number of sine wave periods in one tick. Only used if wave = ticks.

public uint SinePeriodsPerTick { get; set; }

Property Value

uint

Remarks

Default value: 10.

TickInterval

Distance between start of current and start of next tick.

public TimeSpan TickInterval { get; set; }

Property Value

TimeSpan

Remarks

Default value: 1 second.

TimestampOffset

An offset added to timestamps set on buffers.

public TimeSpan TimestampOffset { get; set; }

Property Value

TimeSpan

Remarks

Default value: 0.

Volume

Volume of test signal.

public double Volume { get; set; }

Property Value

double

Remarks

Default value: 0.8.

Wave

Oscillator waveform.

public VirtualAudioSourceSettingsWave Wave { get; set; }

Property Value

VirtualAudioSourceSettingsWave

Remarks

Default value: sine (0).

Methods

CreateBlock()

Creates the block.

public MediaBlock CreateBlock()

Returns

MediaBlock

MediaBlock.

GetMute()

Gets the mute.

public bool GetMute()

Returns

bool

true if successful, false otherwise.

GetVolume()

Gets the volume. Value should be in 0.0 - 1.0 range.

public double GetVolume()

Returns

double

System.Double.

IsSupported()

Determines whether this interface is supported.

public bool IsSupported()

Returns

bool

true if this interface is supported; otherwise, false.

SetInterface(IAudioVolumeMute)

Sets the interface.

public void SetInterface(IAudioVolumeMute intf)

Parameters

intf IAudioVolumeMute

The interface.

SetMute(bool)

Sets the mute.

public void SetMute(bool mute)

Parameters

mute bool

if set to true mute.

SetVolume(double)

Sets the volume. Value should be in 0.0 - 1.0 range.

public void SetVolume(double volume)

Parameters

volume double

The volume.