Internal buffers and real time delays
All device classes (unaWaveInDevice, unaWaveOutDevice and unaMsAcmCodec)
are performing audio stream processing only on blocks of data, or chunks.
Chunk is the minimal amount of data which can be handled at one time.
Furthermore, waveOut device is using double-buffering technique to avoid sound cuts and gaps.
By default chunk size is set to be enough to contain 1/25 second of audio data.
For example, if your application includes one input device, two codecs and one output device,
you should expect the minimal delay of 1/50 + 2/50 + 2/50 = 1/10 sec.
Multithreading
Every device class spawns own thread to operate.
Standard VCL classes and components included in Delphi/C++Builder are designed to be working in main process thread only.
Therefore you should avoid calling standard VCL routines or methods of standard VCL components
from the events assigned to VC components, such as onDataAvailable(), onDataDSP() and others.
CPU window popup
Most likely this problem is caused by Voxware Codec.
For some reason, when querying this codec for details (acmGetDriverDetails),
it generates an int 3 exception, which causes Delphi IDE debugger to stop.
When not running under debugger, this exception is silently ignored.
To prevent this window to popup in IDE you can temporary disable this codec. Follow the steps below to do so (W2K):
- Start - Control Panel - Sounds and Multimedia
- Hardware tab - Audio Codecs - Properties
- Properties tab - Voxware Compression Toolkit - Properties
- select the option (*) Do not use this audio codec
- Press OK to confirm changes.
After that you should be able to debug your applications as normal.
If you need this codec for your work, you can enable it back again after debugging.