You are here: Symbol Reference > AsioAudioSignal Namespace > Classes > TSignalAsio Class
DSP Master VCL
ContentsIndex
PreviousUpNext
TSignalAsio Class

ASIO audio driver component.

AsioAudioSignal_TSignalAsioAsioAudioSignal_TSignalAsioAsioAudioSignal_TSignalAsioAsioAudioSignal_TSignalAsioAsioAudioSignal_TSignalAsio
Pascal
TSignalAsio = class(TSignalList);

Component supports ASIO audio drivers for recording and playback. There can be only one TSignalAsio component for each driver per application and even for the whole computer, because ASIO drivers are very low level. To get a list of available drivers call GetDriverList

Which input and output channels are active is specified with the InputsSelected and OutputsSelected properties. If no inputs are selected, then the component will only perform playback and vice versa. It is possible to select any combination of input and output channels, but what will work depends upon what is supported by the hardware. To see a list of avaliable channels call GetInputChannels and GetOutputChannels

Input channel data can be accessed via default SignalAsio[i] property as TSignal type. Each time OnInputBufferReady event is triggered, these Items contain fresh new data from the recording. 

Before recording can start:

  • Specify SamplingFrequency, which must be supported by the hardware. To see supported sampling rates, call the GetSupportedSamplingFrequencies method. This property needs to be set first. Changes to this property later on will reset other parameters.
  • InputsSelected should specify the channels to be recorded.
  • Specify InputPrecision which defines 16bit, 24bit, double precision format, or other of the data to be recorded (and converted to). ASIO hardware format is fixed and can not be adjusted. The ASIO native format can be read from InPrecisionHw and OutPrecisionHw properties.
  • InputDataLength propery should be adjusted.

 

Output channel data is obtained from Inputs property which must be assigned before the playback starts. Typically TSignalDemuxList would be assigned to Inputs and TSignalDemuxList.Inputs to TSignalRead

Before the playback can start:

  • sampling frequency of the source and ASIO driver must match. The Sampling Frequency for the ASIO component must always be set manually by setting SamplingFrequency property.
  • Channel count must match. See OutputsSelected on how to specify ASIO output channels.
  • OutputPrecision property must be set to reflect the format of the data to be played back. In case of 16bit, it should be set to prSmallInt. If data is stored as double precision and normalized to have a maximum value of 1 then this setting should be prDouble.

 

Once a new buffer is ready, the driver will call OnProcessRealTime event. This event is executed within the drivers thread and should not interact directly with the user interface. From this event OutputBuffers can be accessed and processed just before they will be sent to the hardware with minimum delay time. For loop-back processing, simply copy data from InputBuffers to OutputBuffers

Real time data can be obtained by calling MonitorInput and MonitorOutput methods within a timer. The maximum size of the data fetched depends upon ExtendedBufferTime property, which protects the recording and playback from skipping and missing samples. 

Further information about the playback and recording can be fetched by calling: ElapsedSamples, ElapsedTime, GetDriverLatencies, ActualLatency, ProcessingTime, OutputBufferStats, InputBufferStats

Typically when the user changes the size of the buffer on the ASIO control panel, the OnAsioReset event will be triggered. The size of the buffers can be left to ASIO or set manually by setting DesiredLatencyFromDriver to false and specifying our own with DesiredLatency property in ms.

Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!