You are here: Symbol Reference > CoreAudioSignal Namespace > Classes > TSignalCoreAudioIn Class
DSP Master VCL
ContentsIndex
PreviousUpNext
TSignalCoreAudioIn Class

Audio recording component based on WASAPI drivers.

CoreAudioSignal_TSignalCoreAudioInCoreAudioSignal_TSignalCoreAudioInCoreAudioSignal_TSignalCoreAudioInCoreAudioSignal_TSignalCoreAudioInCoreAudioSignal_TSignalCoreAudioInCoreAudioSignal_TSignalCoreAudioIn
Pascal
TSignalCoreAudioIn = class(TSignalCoreAudio);

Component supports CoreAudio audio drivers for recording. 

Input channel data can be accessed via default SignalCoreAudio[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 SamplingFrequencyHW, which must be supported by the hardware.
  • Specify SamplingFrequency, If not equal to SamplingFrequencyHW, the component will perform rate conversion using parameters specified by TransBW and Ripple properties. The signal comming from the component will always have SamplingFrequency rate. The rate conversion quality is top of the crop, but depends upon TransBW and Ripple parameters which make it possible to find a compromise between CPU usage and audio quality.
  • Specify ChannelCount
  • Specify Precision which defines 16bit, 24bit, double precision format, or other of the data to be converted to. All recorded data will be scaled in to this format.
  • Define PrecisionHw properties. This is the precision of the audio engine. Choose values supported by the audio drivers and hardware. Precision and PrecisionHW are used together to determine the correct scaling.
  • InputDataLength propery should be adjusted. This defines how large chunks of data will be comming from the component. Recommended size is 1024, but this value depends also on any further processing.
  • Assign OnInputBufferReady. If this event is not assigned, the recording will not buffer data. When this event triggers the InpuDataLength amount of samples is ready for further processing within SignalCoreAudioIn[i] default array property.
  • Exclusive can be set to true or false. When access to the device is exclusive, the latency can be less, audio quality higher, but audio device cannot be shared with other applications.

 

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.  

Real time data can be obtained by calling MonitorInput methods from a (user defined) TTimer. The maximum size of the data fetched depends upon ExtendedBufferTime property, which protects the recording and playback from skipping and missing samples. Typically 0.5s of data is buffered. 

Further information about the playback and recording can be fetched by calling: ElapsedSamples, ElapsedTime, GetDriverLatency, ActualLatency, ProcessingTime, BufferStats

The size of the buffers can be specified with DesiredLatency property in ms.

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