TAudioSignal Class

Header: Dew.Signal.Audio/AudioSignal.h · Cross-compiler
tObject→TMtxComponent→TAnalysis→TSignal→TAudioSignal

class TAudioSignal : public TSignal;

Abstract class for audio recording and playback.

Constructors

NameDescription
TAudioSignal (2)

Destructors

NameDescription
~TAudioSignal

Properties

NameTypeDescription
Activebool
AutoPullboolSet 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.
BlockAssignboolBlock streaming of specific properties when storing only a "template".
BufferSizeintDefines the size of the audio stream buffers.
ChannelCountintGet or set the number of channels multiplexed in the data property.
ComplexboolSet this property to true, to request computation using complex numbers.
ContinuousboolIf True, the component will pass on the udpate request to the connected component.
DataTVec*Stores the result of the processing.
DtdoubleTime between two consecutive samples.
EditorActiveboolReturns True, if the component editor is displayed.
FloatPrecisionTMtxFloatPrecisionSet this property to request computation in 32bit/64bit precision with real/complex numbers.
FloatPrecisionLockboolSet this property to true to lock changes to FloatPrecision property.
HzResdoubleFrequency resolution obtained, if an FFT algorithm would be run on the data.
InputTSignal*
InputsTSignalCollection*
IsDoubleboolSet this property to false, to request computation in 32bit floating point precision, 64bit, if true.
ItemNumberintNumber to label the object when it is an item in the List.
LengthintGet or set the length of the signal in samples.
MarksTMarkList*Stores 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.
MonitorAggressivenessintDefines 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.
MonitorFreqfloatThe property keeps the track of the actual frequency of the calls to the MonitorData property.
MultiChannelboolSet MultiChannel to True, if Inputs property will be published, and Input property will remain hidden.
NameDewString
NumBuffersintDefines 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".
OnStarttNotifyEventEvent triggered when processing starts.
OnStoptNotifyEventEvent triggered when processing stops.
OverlappingfloatThe property holds the statistics for the MonitorData method.
PausedboolSet it to true, if you want to pause the playback.
PipeDirtybool
PipeStateTPipeStateReturns the state of the pipe after the last update.
Quantizationunsigned shortDefine dynamics of the signal. 8,16 or 24 bit.
ReferenceTReferenceList*Stores a list of components that have to be notified, when this component is destroyed.
SamplingFrequencydoubleDefines the sampling frequency of the signal.
SamplingTimedoubleThe length of the signal in seconds.
SuspendNotifyUpdateboolSet this property to True, to prevent calling OnNotifyUpdate from the Update Method.
UsesInputsboolSet it to True to indicate, that valid signals will be connected to the Input or Inputs properties.
WaveDeviceintSet WaveDevice to -1, to always use default windows sound device.

Methods

NameDescription
AllowStreaming
AppendAppends Sample to the end of the signal.
Assign
AssignTemplateAssign values of "template-like" published properties from Source.
CopyCopies signal Data and sampling frequency information.
CrestCompute the CREST parameter.
DetectChannelCount
EditorClassTo be overriden in descendanr classses.
ElapsedSamplesReturns total number of samples elapsed since start of the processing.
ElapsedTime
get_CValues
get_Values
GetDeviceListReturns a list of CoreAudio devices.
GetInput
GetInputs
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.
MakeWaveFmtConsistent
MarksToStringsConvert marks to strings.
MinMaxFind minimum and maximum amplitude and store the result in the MinAmplt and MaxAmplt properties.
MonitorData (2)Call MonitorData to obtain data just to be played or just recorded for input/output monitoring purpose.
MonitorOutput
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.
ReferenceRemoved
Reset
SaveTemplateToFileSave template to file.
SaveTemplateToStreamSave template to stream.
SaveToStreamSave the component to Dst stream.
set_CValues
set_Values
SetChannelCountSets the value of TSignal.ChannelCount property.
SetComplex
SetFloatPrecision
SetInputs
SetIsDouble
SetQuantization
SetSamplingFrequencySet the value of the TSignal.SamplingFrequency property.
SizeAssign the size of the signal from Src.
StartStart playback/recording.
StereoReturns True, if the signal is Stereo.
StopAtOnceStop processing at once.
StopGracefullyProcess all pending buffers and then stop.
UpdateRecalculate request.
UpdateNotifyCall this method only, if SuspendNotifyUpdate is True.
Values
ValuesToStringsConvert values to strings.

Operators

NameDescription
operator[]

Fields

NameTypeDescription
ATimeSignalTSignal *
BufIndexint
ContinueProcessingbool
ErrorMessageDewStringThe property holds any error message after an error has occured.
FAutoPullbool
fBitsPerSampleunsigned short
FBufferSizeint
FilledBuffersintNumber of buffers filled with data to be processed, since the start of the processing.
FMonitorAggressivenessint
FMonitorFreqfloat
FNumBuffersint
FOnStarttNotifyEvent
FOnStoptNotifyEvent
FOverlappingfloat
FPausedbool
FRequestedBufferSizeint
FWaveDeviceint
FWaveFmtExTWaveFormatExtensible
FWindowHandlehWnd
GetAllowedbool
GetPointerintPtr
GetSizeint
hWaveBufferDewArray<intPtr>
ProcessedBuffersintNumber of buffers actually processed, since the start of the processing.
PWaveHeadersDewArray<PWaveHdr>
QueuedBuffersintNumber of buffers queued, to be processed, since the start of the processing.
Tagintptr_t
WaveBufferDewArray<intPtr>