Class VirtualAudioSourceSettings
- Namespace
- VisioForge.Core.Types.X.Sources
- Assembly
- VisioForge.Core.dll
Virtual audio source settings.
public class VirtualAudioSourceSettings : IVideoCaptureBaseAudioSourceSettings, IMediaBlockSettings, IAudioVolumeMuteInheritance
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
waveVirtualAudioSourceSettingsWavesampleRateint-
The sample rate.
channelsint-
The channels.
formatAudioFormatX-
The format.
Properties
ApplyTickRamp
Apply ramp to tick samples.
public bool ApplyTickRamp { get; set; }Property Value
Remarks
Default value: false
CanActivatePull
Can activate in pull mode.
public bool CanActivatePull { get; set; }Property Value
Remarks
Default value: false.
CanActivatePush
Can activate in push mode.
public bool CanActivatePush { get; set; }Property Value
Remarks
Default value: true.
Channels
Gets or sets the channels.
public int Channels { get; set; }Property Value
Format
Gets or sets the format.
public AudioFormatX Format { get; set; }Property Value
Frequency
Frequency of test signal. The sample rate needs to be at least 2 times higher.
public double Frequency { get; set; }Property Value
Remarks
Default value: 440.
IsLive
Gets or sets a value indicating whether this instance is live.
public bool IsLive { get; set; }Property Value
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
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
Remarks
Flags: Read / Write Default value: 1
SampleRate
Gets or sets the sample rate.
public int SampleRate { get; set; }Property Value
SamplesPerBuffer
Number of samples in each outgoing buffer
public int SamplesPerBuffer { get; set; }Property Value
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
Remarks
Default value: 10.
TickInterval
Distance between start of current and start of next tick.
public TimeSpan TickInterval { get; set; }Property Value
Remarks
Default value: 1 second.
TimestampOffset
An offset added to timestamps set on buffers.
public TimeSpan TimestampOffset { get; set; }Property Value
Remarks
Default value: 0.
Volume
Volume of test signal.
public double Volume { get; set; }Property Value
Remarks
Default value: 0.8.
Wave
Oscillator waveform.
public VirtualAudioSourceSettingsWave Wave { get; set; }Property Value
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
-
trueif successful,falseotherwise.
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
-
trueif this interface is supported; otherwise,false.
SetInterface(IAudioVolumeMute)
Sets the interface.
public void SetInterface(IAudioVolumeMute intf)Parameters
intfIAudioVolumeMute-
The interface.
SetMute(bool)
Sets the mute.
public void SetMute(bool mute)Parameters
mutebool-
if set to
truemute.
SetVolume(double)
Sets the volume. Value should be in 0.0 - 1.0 range.
public void SetVolume(double volume)Parameters
volumedouble-
The volume.