ACS_DXAudio

Components which deal with audio hardware I/O using the DirectX API.

Summary
ACS_DXAudioComponents which deal with audio hardware I/O using the DirectX API.
Constants
DirectX BuffersThese constants determine the buffer size of DX and thus the delay heard when beginning audio playback.
TDXAudioOutPerforms audio playback using the DirectX API.
Properties
DeviceCountThis read only property returns the number of logical output DirectSound devices.
DeviceNameThis read only array property returns the name of the device specified by its number.
UnderrunsThis read only property returns the number of internal buffer underruns that have occurred during playback.
VolumeUse this property to set or get the volume of the sound being played.
DeviceNumberUse this property to select the playback device by number.
OnUnderrunOnUnderrun event is raised when the component has run out of data.
TDXAudioInPerforms audio recording from a sound card using the DirectX API.
Properties
DeviceCountThis read only property returns the number of logical DirectSound input devices.
DeviceName[Number : Integer]This read only array property returns the name of the device specified by its number.
OverrunsThis read only property returns the number of internal buffer overruns that have occurred during recording.
SamplesToReadUse this property to set the number of samples (frames) the component should record.
DeviceNumberUse this property to select the recording device by number.
InBitsPerSampleUse this property to set the number of bits per sample in the audio stream the component will provide.
InChannelsUse this property to set the number of channels in the audio stream the component will provide.
InSampleRateUse this property to set the sample rate of the audio stream the component will provide.
RecTimeUse this property to set the recording duration (in seconds).
OnOverrunOnOverrun event is raised when this component provides data faster than the rest of audio-processing chain can consume.

Constants

DirectX Buffers

These constants determine the buffer size of DX and thus the delay heard when beginning audio playback.

DS_BUFFER_SIZE$10000; Size in frames, not bytes
DS_POLLING_INTERVAL200; in milliseconds

TDXAudioOut

Performs audio playback using the DirectX API.  Descends from TAuOutput.  TDXAudioOut component buffers its output in order to make it more smooth.  This buffering introduces some delay at the beginning of the audio playback with TDXAudioOut.  You can decrease the delay by decreasing the size of the TDXAudioOut buffer.  The size of this buffer is set up by the DS_BUFFER_SIZE constant in the ACS_DxAudio.pas file.  If you decrease the buffer size you may also want to decrease the DS_POLLING_INTERVAL value which determines how often the component requests data from its input.

Summary
Properties
DeviceCountThis read only property returns the number of logical output DirectSound devices.
DeviceNameThis read only array property returns the name of the device specified by its number.
UnderrunsThis read only property returns the number of internal buffer underruns that have occurred during playback.
VolumeUse this property to set or get the volume of the sound being played.
DeviceNumberUse this property to select the playback device by number.
OnUnderrunOnUnderrun event is raised when the component has run out of data.

Properties

DeviceCount

This read only property returns the number of logical output DirectSound devices.

DeviceName

This read only array property returns the name of the device specified by its number.  Valid numbers range from 0 to DeviceCount - 1.

Underruns

This read only property returns the number of internal buffer underruns that have occurred during playback.

Volume

Use this property to set or get the volume of the sound being played.  The default value is 0 which corresponds to the original volume of the sound.  Valid values range from -10000 (silence) to 0.  The Volume property allows you to make the played sound softer than the original one, but not louder.

DeviceNumber

Use this property to select the playback device by number.  The default value is 0 which corresponds to the default audio output device in your system.  Valid numbers range from 0 to DeviceCount - 1.

OnUnderrun

OnUnderrun event is raised when the component has run out of data.  This can happen if the component receives data at slow rate from a slow CD-ROM unit or a network link.  You will also get OnUnderrun event when unpausing paused playback (this is a normal situation).  Usually TDXAudioOut successfully recovers from underruns by itself, but this causes pauses in playback so if you start to receive OnUnderrun events, you may try to increase the speed rate of data passing to the component, if you can.  Yo can check the Underruns property for the total number of underruns.

TDXAudioIn

Performs audio recording from a sound card using the DirectX API.  Descends from TAuInput.

Summary
Properties
DeviceCountThis read only property returns the number of logical DirectSound input devices.
DeviceName[Number : Integer]This read only array property returns the name of the device specified by its number.
OverrunsThis read only property returns the number of internal buffer overruns that have occurred during recording.
SamplesToReadUse this property to set the number of samples (frames) the component should record.
DeviceNumberUse this property to select the recording device by number.
InBitsPerSampleUse this property to set the number of bits per sample in the audio stream the component will provide.
InChannelsUse this property to set the number of channels in the audio stream the component will provide.
InSampleRateUse this property to set the sample rate of the audio stream the component will provide.
RecTimeUse this property to set the recording duration (in seconds).
OnOverrunOnOverrun event is raised when this component provides data faster than the rest of audio-processing chain can consume.

Properties

DeviceCount

This read only property returns the number of logical DirectSound input devices.

DeviceName[Number : Integer]

This read only array property returns the name of the device specified by its number.  Valid numbers range from 0 to DeviceCount - 1.

Overruns

This read only property returns the number of internal buffer overruns that have occurred during recording.

SamplesToRead

Use this property to set the number of samples (frames) the component should record.  If you set this property value to -1 the component will be endlessly recording until you stop it.

DeviceNumber

Use this property to select the recording device by number.  The property default value is 0 which corresponds to the default audio input device in your system.  Valid numbers range from 0 to DeviceCount - 1.

InBitsPerSample

Use this property to set the number of bits per sample in the audio stream the component will provide.  Possible values are 8, 16, and 24 (the last one depends on the capabilities of your hardware).

InChannels

Use this property to set the number of channels in the audio stream the component will provide.  Possible values are 1 (mono), and 2 (stereo).

InSampleRate

Use this property to set the sample rate of the audio stream the component will provide.  Possible values range from 4000 to 128000 (depends on the capabilities of your hardware).

RecTime

Use this property to set the recording duration (in seconds).  If set this property overrides the value of <BytesToRead>.  If you set this property value to -1 (the default) the component will be endlessly recording until you stop it.

OnOverrun

OnOverrun event is raised when this component provides data faster than the rest of audio-processing chain can consume.  It indicates that some data is lost.  You may also get OnOverrun event when unpausing paused recording (this is a normal situation).  To get the total number of overruns read the Overruns property.

The ancestor class for all output components.
This read only property returns the number of logical output DirectSound devices.
This read only property returns the number of internal buffer underruns that have occurred during playback.
The ancestor class for all input components.
This read only property returns the number of logical DirectSound input devices.
This read only property returns the number of internal buffer overruns that have occurred during recording.
Close