DSP Master VCL
|
ASIO audio driver component.
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:
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:
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!
|