SignalOut Class

Source: AudioSignal.cs · Assembly: Dew.Signal.Audio
ComponentTMtxComponentTAnalysisTSignalAudioSignalSignalOut

public class SignalOut : AudioSignal

Send data to audio card for playback.

Use TSignalOut for playback of audio data. There are two ways to provide an audio stream to the component. One is via the Pull method, which is called each time a new buffer is required once the processing has started.

The Pull method is called only, if AutoPull property is True. The other method uses the OnBufferFill event. In both cases the audio data must be placed in the TSignal object connected to the Input property.

Properties

NameTypeDescription
ActiveBoolean
AutoPullBooleanSet the property to True, for the component to call Pull method each time a new buffer is requested.
BandWidthDoubleReturn the bandwidth of the signal.
BandwidthHDoubleReturns the upper bandwidth edge of the signal.
BandwidthLDoubleReturns the lower bandwidth edge of the signal.
BlockAssignBooleanBlock streaming of specific properties when storing only a "template".
BufferSizeInt32
ChannelCountInt32Get or set the number of channels multiplexed in the data property.
ComplexBooleanSet this property to true, to request computation using complex numbers.
ContinuousBooleanIf True, the component will pass on the udpate request to the connected component.
DataTVecStores the result of the processing.
DtDoubleTime between two consecutive samples.
EditorActiveBooleanReturns True, if the component editor is displayed.
FloatPrecisionTMtxFloatPrecisionSet this property to request computation in 32bit/64bit precision with real/complex numbers.
FloatPrecisionLockBooleanSet this property to true to lock changes to FloatPrecision property.
HzResDoubleFrequency resolution obtained, if an FFT algorithm would be run on the data.
InputTSignal
IsDoubleBooleanSet this property to false, to request computation in 32bit floating point precision, 64bit, if true.
ItemDoubleDefault property to access values of a real signal.
ItemNumberInt32Number to label the object when it is an item in the List.
LengthInt32Get or set the length of the signal in samples.
MarksTMarkListStores the time stamps and amplitude of selected samples.
MaxAmpltDoubleStores the maximum amplitude of the signal found by the MinMax method.
MaxXDoubleUse the MaxX property to store the time stamp (in seconds) of the right most sample.
MinAmpltDoubleStores the minimum amplitude of the signal found by the MinMax method.
MinXDoubleUse the MinX property to store the time stamp of the left-most sample.
MonitorAggressivenessInt32Defines how aggressivelly will the MonitorData function attempt to obtain the very latest data (just to be recorded or just to be played back.) The value is defined in miliseconds.
MonitorFreqSingleThe property keeps the track of the actual frequency of the calls to the MonitorData property.
NumBuffersInt32Defines number of buffers being gueued to be processed.
OnAfterUpdateTNotifyEventThe event is triggered after the call to the Update method.
OnBeforeUpdateTNotifyEventThe event is triggered just before the call to the Update method.
OnDisplayUpdateTNotifyEventThe event is triggered after the OnAfterUpdate event. Use this event to update any associated charts or graphs or result tables.
OnGetInputTNotifyEventIf the Input property is not assigned, the component will call OnGetInput.
OnNotifyUpdateTNotifyEventThe event is called after a call to InternalUpdate, OnAfterUpdate and OnDisplayUpdate from within the Update method.
OnParameterUpdateTNotifyEventThe event is triggered when ParamUpdate method is called. The ParamUpdate method is usually called by component editors when a value was changed by the user and the editor was "Live".
OverlappingSingleThe property holds the statistics for the MonitorData method.
PausedBooleanSet it to true, if you want to pause the playback.
PipeStateTPipeStateReturns the state of the pipe after the last update.
QuantizationUInt16Define dynamics of the signal. 8,16 or 24 bit.
ReferenceTReferenceListStores a list of components that have to be notified, when this component is destroyed.
RoundingTRoundingSpecifies the rounding mode used when converting floating point data to the integer type format needed by the windows sound driver.
SamplingFrequencyDoubleDefines the sampling frequency of the signal.
SamplingTimeDoubleThe length of the signal in seconds.
ScaleFactorDoubleDefines the scale factor by which the data will be scaled just before it will be played.
SuspendNotifyUpdateBooleanSet this property to True, to prevent calling OnNotifyUpdate from the Update Method.
UsesInputsBooleanSet it to True to indicate, that valid signals will be connected to the Input or Inputs properties.
WaveDeviceInt32Set WaveDevice to -1, to always use default windows sound device.

Methods

NameDescription
AllowStreamingReturns the negatated value of BlockAssign.
AppendAppends Sample to the end of the signal.
AssignAssign values of all published properties from Source.
AssignTemplateAssign values of "template-like" published properties from Source.
CopyCopies signal Data and sampling frequency information.
CrestCompute the CREST parameter.
ctor (3)
Dispose
EditorClass
ElapsedSamplesThe function returns the total number of samples elapsed since the start of the playback.
ElapsedTimeThe function returns the total time elapsed in seconds since the start of the playback.
InputsDirtyIf all Inputs[i] are dirty the function returns true.
InternalPullWhen called, the method will pass Update requests recursively to all connected objects.
InvalidateNotifies all connected components that this component has fresh data.
LoadFromStreamLoad the component from Src stream.
LoadTemplateFromFileLoad a template from file.
LoadTemplateFromStreamLoad a template from stream.
MarksToStringsConvert marks to strings.
MinMaxFind minimum and maximum amplitude and store the result in the MinAmplt and MaxAmplt properties.
MonitorData (2)Returns data multiplexed.
ParamUpdateThe method can be assigned to some other component even handler, as a notification that a parameter has changed and that Self should consider a recalculation.
PeakFind the maximum deviation of the signal from its mean value.
PipeResetRecursively processes all connected components backward and calls Reset method.
PullRequest recalculation of the entire chain of all connected components.
PullUntilEndCalls Pull until pipeEnd is returned.
RecomendedBufferLengthTo ensure skip free recording an playback, audio buffers must have some minimum size.
RecomendedBufferSizeTo ensure skip free recording an playback, audio buffers must have some minimum size.
ResetReset is called after loading the data from stream or file.
SaveTemplateToFileSave template to file.
SaveTemplateToStreamSave template to stream.
SaveToStreamSave the component to Dst stream.
SizeAssign the size of the signal from Src.
StartStart playback.
StereoReturns True, if the signal is Stereo.
StopAtOnce
StopGracefully
UpdateRecalculate request.
UpdateNotifyCall this method only, if SuspendNotifyUpdate is True.
ValuesToStringsConvert values to strings.

Constants

NameTypeDescription
ErrorMessageStringThe property holds any error message after an error has occured.
FilledBuffersInt32Number of buffers filled with data to be processed, since the start of the processing.
ProcessedBuffersInt32Number of buffers actually processed, since the start of the processing.
QueuedBuffersInt32Number of buffers queued, to be processed, since the start of the processing.
WaveHandleIntPtrWaveform output handle.

Events

NameDescription
OnAfterUpdateEventThe event is triggered after the call to the Update method.
OnBeforeUpdateEventThe event is triggered just before the call to the Update method.
OnBufferFillEvent is called when a new buffer of data is required.
OnDisplayUpdateEventThe event is triggered after the OnAfterUpdate event. Use this event to update any associated charts or graphs or result tables.
OnGetInputEventIf the Input property is not assigned, the component will call OnGetInput.
OnNotifyUpdateEventThe event is called after a call to InternalUpdate, OnAfterUpdate and OnDisplayUpdate from within the Update method.
OnParameterUpdateEventThe event is triggered when ParamUpdate method is called. The ParamUpdate method is usually called by component editors when a value was changed by the user and the editor was "Live".
OnStart
OnStop