Voice Communicator components version 2.5.2008.01 Pro classes reference

Last updated: January 2008

List of most important units included in VC components version 2.5 Pro:


Unit unaVCIDE.

Contains the following VC 2.5 Pro components and classes:
TunavclWaveInDevice TunavclWaveOutDevice TunavclWaveCodecDevice TunavclWaveRiff TunavclWaveMixer TunavclWaveResampler TunavclIPOutStream TunavclIPInStream TunavclIPBroadcastServer TunavclIPBroadcastClient TunavclScriptor

Classes:

Routines:


Unit classes

Class unavclInOutPipe(tComponent)

Base abstract class for all VCL components in VC set.

function unavclInOutPipe.doWrite(data: pointer; len: unsigned; provider: unavclInOutPipe = nil): unsigned; virtual; abstract;

Writes data into the pipe.

function unavclInOutPipe.doRead(data: pointer; len: unsigned): unsigned; virtual; abstract;

Reads data from the pipe.

function unavclInOutPipe.getAvailableDataLen(index: int): unsigned; virtual; abstract;

Returns available data size in the pipe.

function unavclInOutPipe.doOpen(): bool; virtual;

Opens the pipe.

procedure unavclInOutPipe.doClose(); virtual;

Closes the pipe.

function unavclInOutPipe.isActive(): bool; virtual; abstract;

Returns true if component was activated.

function unavclInOutPipe.doEnter(timeOut: unsigned = 1000): bool; virtual; abstract;

Restricts the execution of the pipe to one thread.

procedure unavclInOutPipe.doLeave(); virtual; abstract;

Removes the restrictions on the execution of the pipe.

function unavclInOutPipe.onNewData(data: pointer; len: unsigned; provider: unavclInOutPipe = nil): bool; virtual;

Processes new data available from the pipe.

function unavclInOutPipe.applyFormat(data: pointer; len: unsigned; provider: unavclInOutPipe = nil; restoreActiveState: bool = false): bool; virtual;

Applies new format of the stream to the pipe.

function unavclInOutPipe.getFormatExchangeData(out data: pointer): unsigned; virtual;

Fills the format of the pipe stream.

function unavclInOutPipe.doGetPosition(): int64; virtual;

procedure unavclInOutPipe.Notification(component: tComponent; operation: tOperation); override;

function unavclInOutPipe.doAddProvider(provider: unavclInOutPipe): bool; virtual;

Assigns new provider for the pipe. Only mixer can support more that one providers.

procedure unavclInOutPipe.doRemoveProvider(provider: unavclInOutPipe); virtual;

Removes one of pipe's providers.

function unavclInOutPipe.doAddConsumer(consumer: unavclInOutPipe; forceNewFormat: bool = true): bool; virtual;

Adds new consumer for the pipe. Only one consumer is currently supported.

procedure unavclInOutPipe.doRemoveConsumer(consumer: unavclInOutPipe); virtual;

Removes consumer from the pipe.

procedure unavclInOutPipe.doSetEnableDP(value: bool); virtual;

procedure unavclInOutPipe.Loaded(); override;

Usually creates an internal device of the pipe, and activates the component if needed.

procedure unavclInOutPipe.AfterConstruction(); override;

Creates a pipe.

procedure unavclInOutPipe.BeforeDestruction(); override;

function unavclInOutPipe.enter(timeOut: unsigned = 1000): bool;

Enters the pipe one-thread execution mode.

procedure unavclInOutPipe.leave();

Leaves the pipe one-thread execution mode.

function unavclInOutPipe.write(data: pointer; len: unsigned; provider: unavclInOutPipe = nil): unsigned; overload;

Writes data into the pipe.

function unavclInOutPipe.write(const data: string; provider: unavclInOutPipe = nil): unsigned; overload;

Writes data into the pipe.

function unavclInOutPipe.read(data: pointer; len: unsigned): unsigned; overload;

If you did not specify the consumer for component, you must call read() method periodically to access the stream data. Best place to do that is onDataAvailable() event handler.

function unavclInOutPipe.read(): string; overload;

Reads data as a string.

function unavclInOutPipe.open(): bool;

Opens the pipe.

procedure unavclInOutPipe.close(timeout: int = 0);

Closes the pipe.

function unavclInOutPipe.addProvider(provider: unavclInOutPipe): bool;

Assigns new provider for the pipe. Only mixer can support more that one providers.

procedure unavclInOutPipe.removeProvider(provider: unavclInOutPipe);

Removes one of pipe's providers.

function unavclInOutPipe.addConsumer(consumer: unavclInOutPipe; forceNewFormat: bool = true): bool;

Adds new consumer for the pipe. Only one consumer is currently supported.

procedure unavclInOutPipe.removeConsumer(consumer: unavclInOutPipe);

Removes consumer from the pipe.

function unavclInOutPipe.getConsumer(index: unsigned = 0): unavclInOutPipe;

Returns consumer of a pipe.

function unavclInOutPipe.getProvider(index: unsigned = 0): unavclInOutPipe;

Returns provider of a pipe.

function unavclInOutPipe.getConsumerCount(): unsigned;

Returns number of consumers.

function unavclInOutPipe.getProviderCount(): unsigned;

Returns number of providers.

function unavclInOutPipe.getConsumerIndex(value: unavclInOutPipe): int;

Returns index of specified consumer.

function unavclInOutPipe.getProviderIndex(value: unavclInOutPipe): int;

Returns index of specified provider.

function unavclInOutPipe.getPosition(): int64;

Returns current position for stream.

procedure unavclInOutPipe.clearFormatCRC();

Forces component to assign a format to consumers. Call this method before activation.

property unavclInOutPipe.availableDataLenIn: unsigned;

Returns data written into but not yet processed by the pipe.

property unavclInOutPipe.availableDataLenOut: unsigned;

Returns data size available to read from the pipe.

property unavclInOutPipe.inBytes: int64;

Number of bytes received by the pipe.

property unavclInOutPipe.outBytes: int64;

Number of bytes produced by the pipe.

property unavclInOutPipe.enableDataProcessing: bool;

Specifies whether the component would perform any data processing.

property unavclInOutPipe.position: int64;

Current position in stream.

property unavclInOutPipe.providerOneAndOnly: unavclInOutPipe;

property unavclInOutPipe.consumers[]: unavclInOutPipe;

Array of component consumers.

property unavclInOutPipe.providers[]: unavclInOutPipe;

Array of providers for component.

property unavclInOutPipe.active: bool;

Returns or sets the current state of the pipe. Set to true to activate (open) the component. All other properties should be set to proper values before activation. Set to false to deactivate (close) the component.

property unavclInOutPipe.consumer: unavclInOutPipe;

Specifies the consumer of component. When set, specified consumer will receive all the stream data from the component. This allows chaining the components into data flow row.

property unavclInOutPipe.dumpInput: string;

Specifies the file name to store the stream into. dumpInput is be used to store the input stream, which is coming as input for component. Stream will be saved in "as is" format. For example, TunavclWaveOutDevice will store input stream as sequence of PCM samples.

property unavclInOutPipe.dumpOutput: string;

Specifies the file name to store the stream into. dumpOutput is be used to store the output stream, which is coming as output from the component. Stream will be saved in "as is" format. For example, TunavclWaveInDevice will store output stream as sequence of PCM samples.

property unavclInOutPipe.isFormatProvider: bool;

When true the component will assign stream format to the consumer (if any). This simplifies the process of distributing stream format among linked components. For example TunavclWaveRiff component can assign PCM format for linked TunavclWaveOutDevice component, so WAVe file will be played back correctly.

property unavclInOutPipe.autoActivate: bool;

When true tells the component it must activate consumer (if any) before activating itself. Same applies for deactivation. When false the component does not change the consumer state.

property unavclInOutPipe.enableDataProxy: bool;

When true tells the component it must activate consumer (if any) before activating itself. Same applies for deactivation. When false the component does not change the consumer state.

property unavclInOutPipe.onDataAvailable: unavclPipeDataEvent;

This event is fired every time component has produced or received new chunk of data. Use this event to access the raw stream data. Any modifications you made with data will not affect data consumers. To modify data before it will passed to consumers, use onDataDSP() event.
NOTE: VCL is NOT multi-threading safe, and you should avoid using VCL routines and classes in this event.

property unavclInOutPipe.onDataDSP: unavclPipeDataEvent;

This event is fired every time component has produced or received new chunk of data. Use this event to access the raw stream data. Any modifications you made on data will be passed to comsumers. To modify data without affecting consumers, use onDataAvail() event.
NOTE: VCL is NOT multi-threading safe, and you should avoid using VCL routines and classes in this event.

property unavclInOutPipe.onFormatChangeAfter: unavclPipeAfterFormatChangeEvent;

This event is fired after new format was applied to a pipe.
NOTE: VCL is NOT multi-threading safe, and you should avoid using VCL routines and classes in this event.

property unavclInOutPipe.onFormatChangeBefore: unavclPipeBeforeFormatChangeEvent;

This event is fired before new format is about to be applied to a pipe. Using allowFormatChange parameter it is possible to disable format's applying.
NOTE: VCL is NOT multi-threading safe, and you should avoid using VCL routines and classes in this event.

Class unavclInOutWavePipe(unavclInOutPipe)

Base abstract class for wave devices.

procedure unavclInOutWavePipe.doSetDeviceId(value: int); virtual;

procedure unavclInOutWavePipe.doSetFormatTag(value: unsigned); virtual;

procedure unavclInOutWavePipe.doSetFormat(value: pWAVEFORMATEX); virtual;

procedure unavclInOutWavePipe.doSetDriver(value: unaMsAcmDriver); virtual;

procedure unavclInOutWavePipe.doSetSamplingParam(index: int; value: unsigned); virtual;

procedure unavclInOutWavePipe.doSetAddSilence(value: bool); virtual;

procedure unavclInOutWavePipe.doSetLoop(value: bool); virtual;

procedure unavclInOutWavePipe.doSetDriverMode(value: unaAcmCodecDriverMode); virtual;

procedure unavclInOutWavePipe.doSetDriverLibrary(const value: wideString); virtual;

function unavclInOutWavePipe.doGetPosition(): int64; override;

procedure unavclInOutWavePipe.createNewDevice(); virtual;

Does all the job of device creation. Should be overriten with actual implementation. Should not be called directly.

procedure unavclInOutWavePipe.destroyOldDevice(); virtual;

function unavclInOutWavePipe.applyDeviceFormat(const format: WAVEFORMATEX; isSrc: bool = true): bool; virtual;

Applies new stream format for the wave device.

function unavclInOutWavePipe.doWrite(data: pointer; len: unsigned; provider: unavclInOutPipe = nil): unsigned; override;

Writes data into the wave device.

function unavclInOutWavePipe.doRead(data: pointer; len: unsigned): unsigned; override;

Reads data from the wave device.

function unavclInOutWavePipe.getAvailableDataLen(index: int): unsigned; override;

Returns data size available to read from the wave device.

function unavclInOutWavePipe.doOpen(): bool; override;

Opens the wave device.

procedure unavclInOutWavePipe.doClose(); override;

Closes the wave device.

function unavclInOutWavePipe.doEnter(timeOut: unsigned = 1000): bool; override;

Enters one-thread execution mode for the wave device.

procedure unavclInOutWavePipe.doLeave(); override;

Leaves one-thread execution mode for the wave device.

function unavclInOutWavePipe.isActive(): bool; override;

Returns active state of the wave device.

function unavclInOutWavePipe.applyFormat(data: pointer; len: unsigned; provider: unavclInOutPipe = nil; restoreActiveState: bool = false): bool; override;

Applies stream format on the pipe.

function unavclInOutWavePipe.getFormatExchangeData(out data: pointer): unsigned; override;

Returns format exchange data of the pipe stream.

function unavclInOutWavePipe.getChunkSize(): unsigned; virtual;

function unavclInOutWavePipe.getDstChunkSize(): unsigned; virtual;

procedure unavclInOutWavePipe.onDriverChanged(); virtual;

Triggers when device driver has been changed.

procedure unavclInOutWavePipe.Loaded(); override;

Initializes the wave device.

function unavclInOutWavePipe.doAddProvider(provider: unavclInOutPipe): bool; override;

Adds provider to the wave device.

procedure unavclInOutWavePipe.doRemoveProvider(provider: unavclInOutPipe); override;

Removes provider from the wave device.

property unavclInOutWavePipe.deviceWasCreated: bool;

Internal.

property unavclInOutWavePipe.addSilence: bool;

Specifies whether device should add silence when it runs out of audio data.

property unavclInOutWavePipe.deviceId: int;

Specifies device ID for the wave device.

property unavclInOutWavePipe.formatTag: unsigned;

Specifies audio format tag for the wave device.

property unavclInOutWavePipe.formatTagImmunable: bool;

Specifies the device is immunable for format tag changes (usually useful for codecs).

property unavclInOutWavePipe.mapped: bool;

Specifies whether wave device is mapped.

property unavclInOutWavePipe.direct: bool;

Specifies whether wave device is direct.

property unavclInOutWavePipe.realTime: bool;

Specifies whether device is working as real-time device.

property unavclInOutWavePipe.loop: bool;

Specifies whether wave stream should be looped from end to beginning.

property unavclInOutWavePipe.inputIsPcm: bool;

Specifies whether format of input stream of the device is PCM.

property unavclInOutWavePipe.driverMode: unaAcmCodecDriverMode;

property unavclInOutWavePipe.driverLibrary: wideString;

property unavclInOutWavePipe.silenceDetectionMode: unaWaveInSDMehtods;

Specifies which method will be used to detect silence.

  • unasdm_none - no silence detection
  • unasdm_VC - "old" method, which uses minVolumeLevel and minActiveTime
  • unasdm_DSP

constructor unavclInOutWavePipe.Create(owner: tComponent); override;

Assigns default values for properties.

constructor unavclInOutWavePipe.createWaveDevice();

procedure unavclInOutWavePipe.AfterConstruction(); override;

Creates the wave device.

procedure unavclInOutWavePipe.BeforeDestruction(); override;

Destroys the wave device.

procedure unavclInOutWavePipe.createDevice();

Destroys previuosly created wave device, then creates new one. Assigns required callbacks for device.

procedure unavclInOutWavePipe.createDriver();

Creates ACM driver for device (if needed).

procedure unavclInOutWavePipe.ensureFormat();

Refreshes the device format.

function unavclInOutWavePipe.getVolume(channel: int = 0): int;

Returns current volume value. calcVolume must be set to true.

procedure unavclInOutWavePipe.flush();

Flushes any data panding.

property unavclInOutWavePipe.acm: unaMsAcm;

Returns ACM manager for the device.

property unavclInOutWavePipe.driver: unaMsAcmDriver;

Returns device driver.

property unavclInOutWavePipe.device: unaMsAcmStreamDevice;

Returns wave device associated with the pipe.

property unavclInOutWavePipe.pcmFormat: pWAVEFORMATEX;

Returns PCM format of the wave device.

property unavclInOutWavePipe.chunkSize: unsigned;

property unavclInOutWavePipe.dstChunkSize: unsigned;

property unavclInOutWavePipe.waveError: int;

property unavclInOutWavePipe.waveErrorAsString: string;

property unavclInOutWavePipe.calcVolume: bool;

When true tells the component to calculate the audio volume of a stream coming into or from the component. Use the getVolume() method to get the current volume level.

property unavclInOutWavePipe.startDeviceOnOpen: bool;

property unavclInOutWavePipe.overNum: unsigned;

Specifies how many chunks of data (every chunk can hold 1/10 second of audio) component can store in the input or output buffer, if data cannot be processed immediately. Set this property to 0 to disable the buffer overflow checking (be carefully, since this could lead to uncontrolled memory usage grow).

property unavclInOutWavePipe.pcm_samplesPerSec: unsigned;

Specifies number of samples per second for wave device. Common values are 44100, 22050, 11025 and 8000.

property unavclInOutWavePipe.pcm_bitsPerSample: unsigned;

Specifies number of bits per sample for wave device. Common values are 8 and 16.

property unavclInOutWavePipe.pcm_numChannels: unsigned;

Specifies number of channels per sample for wave device. Common values are 1 (mono) and 2 (stereo).

Class TunavclWaveInDevice(unavclInOutWavePipe)

Purpose: real time PCM audio stream recording from the sound card or other hardware device.

Usage: If components has no provider component with formatProvider=true, specify PCM stream parameters before activating: pcm_SamplesPerSec, pcm_BitsPerSample and pcm_NumChannels. Set deviceId property if required. minActiveTime and minVolumeLevel controls the silence detection behavior.

Example: refer to the vcTalkNow demo. It has waveIn_server and waveIn_client components. Both are used to record real-time PCM stream to be sent to remote side. waveIn_server has c_codec_serverOut component as a consumer. That means PCM stream produced by waveIn_server will be passed to c_codec_serverOut component automatically.

procedure TunavclWaveInDevice.createNewDevice(); override;

Creates waveIn (recording) device.

procedure TunavclWaveInDevice.AfterConstruction(); override;

property TunavclWaveInDevice.waveInDevice: unaWaveInDevice;

Returns waveIn device.

property TunavclWaveInDevice.deviceId: [unknown];

property TunavclWaveInDevice.mapped: [unknown];

property TunavclWaveInDevice.direct: [unknown];

property TunavclWaveInDevice.calcVolume: [unknown];

property TunavclWaveInDevice.minVolumeLevel: unsigned;

Minimum volume level for recording.

property TunavclWaveInDevice.minActiveTime: unsigned;

Minimum active time for recording.

property TunavclWaveInDevice.isFormatProvider: [unknown];

waveIn component is usually a format provider--so this property value was changed to be true by default.

property TunavclWaveInDevice.onThreshold: unaWaveInOnThresholdEvent;

property TunavclWaveInDevice.enableDataProcessing: [unknown];

Specifies whether the component would produce any data. Setting this property to False does not release the waveIn device. Set active property to False to release the device as well.

property TunavclWaveInDevice.silenceDetectionMode: [unknown];

Specifies how component should detect silence.

Class TunavclWaveOutDevice(unavclInOutWavePipe)

Purpose: real time PCM audio stream playback using the sound card or other hardware device.

Usage: If components has no provider component with formatProvider=true, specify PCM stream parameters before activating: pcm_SamplesPerSec, pcm_BitsPerSample and pcm_NumChannels.

Example: refer to the vcTalkNow demo. It has waveOut_server and waveOut_client components. Both are used to playback real-time PCM stream received from remote side. In this demo, waveOut_server is a consumer of c_codec_serverIn component. That means PCM stream, produced by c_codec_serverIn will be passed to waveOut_server automatically.

procedure TunavclWaveOutDevice.createNewDevice(); override;

Creates wave Out (playback) device.

property TunavclWaveOutDevice.inputIsPcm: [unknown];

Since waveOut device is output device, and output format is PCM, we should specify input format as not PCM.

procedure TunavclWaveOutDevice.AfterConstruction(); override;

property TunavclWaveOutDevice.waveOutDevice: unaWaveOutDevice;

Returns waveOut device.

property TunavclWaveOutDevice.deviceId: [unknown];

property TunavclWaveOutDevice.mapped: [unknown];

property TunavclWaveOutDevice.direct: [unknown];

property TunavclWaveOutDevice.calcVolume: [unknown];

property TunavclWaveOutDevice.enableDataProcessing: [unknown];

Specifies whether the component would playback any data. Setting this property to False does not release the waveOut device. Set active property to False to release the device as well.

property TunavclWaveOutDevice.onFeedChunk: unavclPipeDataEvent;

Fired when another audio chunk was passed to driver for playback. If you are self-feeding the playback, it means you have to feed another chunk to achieve continuous playback.
NOTE: VCL is NOT multi-threading safe, and you should avoid using VCL routines and classes in this event.

property TunavclWaveOutDevice.onFeedDone: unavclPipeDataEvent;

Fired when chunk was just played out by device. This is a good place for any user feedback. Since the data passed to this event was played out about 1/25 second ago, you can achieve very short delay between actual data being played back, and feedback. For example, if you draw an oscilloscope of a wave, use this event to be in synch with actual playback.
NOTE: VCL is NOT multi-threading safe, and you should avoid using VCL routines and classes in this event.

Class TunavclWaveCodecDevice(unavclInOutWavePipe)

Purpose: audio stream conversion from one supported format to another. It can convert PCM stream to other format (compression) or other format to PCM (decompression).

Usage: If components has no provider component with formatProvider=true, specify PCM stream parameters before activating: pcm_SamplesPerSec, pcm_BitsPerSample and pcm_NumChannels. Set formatTag property to specify the audio format you wish to compress to or decompress from. Refer to WAVE_FORMAT_XXXX constants from unaMsAcmAPI.pas unit for possible values of this property, or you can use the output of amcEnum demo to receive the list of installed formats. Set inputIsPCM to true, if you wish to convert PCM stream to another audio format (compression). Set inputIsPCM to false, if you wish to convert some audio format to PCM stream (decompression).

Example: refer to the vcTalkNow demo. It has c_codec_serverOut component, which is a consumer of waveIn_server component. That means PCM stream, produced by waveIn_server will be passed to c_codec_serverOut automatically. It also has ip_server as a consumer. That means compressed audio stream will be passed to ip_server automatically.

procedure TunavclWaveCodecDevice.doSetDriverMode(value: unaAcmCodecDriverMode); override;

procedure TunavclWaveCodecDevice.doSetDriverLibrary(const value: wideString); override;

procedure TunavclWaveCodecDevice.createNewDevice(); override;

Creates ACM codec device.

procedure TunavclWaveCodecDevice.onDriverChanged(); override;

Notifies ACM codec device about driver change.

function TunavclWaveCodecDevice.applyDeviceFormat(const format: WAVEFORMATEX; isSrc: bool = true): bool; override;

Applies PCM format for ACM codec device.

function TunavclWaveCodecDevice.getFormatExchangeData(out data: pointer): unsigned; override;

Returns format exchange data of the codec.

procedure TunavclWaveCodecDevice.AfterConstruction(); override;

function TunavclWaveCodecDevice.setNonPCMFormat(const format: WAVEFORMATEX): bool;

Sets non-PCM format for ACM codec device.

property TunavclWaveCodecDevice.codec: unaMsAcmCodec;

Returns ACM codec device.

property TunavclWaveCodecDevice.formatTag: [unknown];

property TunavclWaveCodecDevice.inputIsPcm: [unknown];

property TunavclWaveCodecDevice.calcVolume: [unknown];

property TunavclWaveCodecDevice.formatTagImmunable: [unknown];

Codecs usually does not use the format tag provided by other PCM devices.

property TunavclWaveCodecDevice.driverMode: [unknown];

ACM driver mode. When set to unacdm_acm, codec uses ACM to access stream conversion routines. unacdm_installable tells codec to use installable driver, specified by driverLibrary. unacdm_internal is not currently used.

property TunavclWaveCodecDevice.driverLibrary: [unknown];

When driverMode is set to unacdm_installable this property specifies the name of driver library to use. Refer to MSDN documentation for more information about installable drivers.

property TunavclWaveCodecDevice.isFormatProvider: [unknown];

codec component is usually a format provider--so default value for was changed to true.

property TunavclWaveCodecDevice.enableDataProcessing: [unknown];

Specifies whether the component would perform any data conversion.

property TunavclWaveCodecDevice.silenceDetectionMode: [unknown];

Specifies how component should detect silence.

Class TunavclWaveRiff(unavclInOutWavePipe)

Purpose: reads audio stream from WAV file, producing PCM stream, or creates and writes new WAV file.

Usage: set fileName property to specify the file to use. Set isInput to true if you wish to read from WAV file. Set isInput to false if you wish to create and write into WAV file. Set active to true, or call the open() method to start reading or writing. Set active to false, or call the close() method to stop reading, or close the produced WAV file. Set realTime to true if you wish the stream read from WAV file will be available in real time manner.

Example (reading): refer to the vcWavePlayer demo. Look for wavIn component, which is used to read the stream from WAV file. It has waveResampler as a consumer, that means read audio stream will be passed to waveResampler automatically.

Example (writing): refer to the voiceRec demo. Look for waveRiff component, which is a consumer of waveIn component. That means PCM stream, produced by waveIn will be passed to waveRiff automatically. In this demo waveRiff component is used to create the WAV file.

procedure TunavclWaveRiff.doSetLoop(value: bool); override;

procedure TunavclWaveRiff.createNewDevice(); override;

Creates Riff wave device.

function TunavclWaveRiff.applyDeviceFormat(const format: WAVEFORMATEX; isSrc: bool = true): bool; override;

This method is supported in WAV-writing mode only (isInput = false), and only PCM formats are supported.

function TunavclWaveRiff.getFormatExchangeData(out data: pointer): unsigned; override;

procedure TunavclWaveRiff.AfterConstruction(); override;

Creates Riff wave device.

function TunavclWaveRiff.loadFromFile(const fileName: string; asynchronous: bool = false): bool;

Loads data from specified WAV file. If asynchronous = false (default), does not return until whole file is loaded, and closes the device after that. Otherwise returns immediately after opening the device. If autoCloseOnDone property is true (default) device will be closed automatically when reading from file is complete. Otherwise use onStreamIsDone() event to be notified when reading from file is complete.
This function sets realTime property to false and isInput property to true.

function TunavclWaveRiff.saveToFile(const fileName: string; data: pointer; size: unsigned; asynchronous: bool = false): bool;

Saves data into specified WAV file. If asynchronous = false (default), does not return until whole data block is written, and closes the device after that. Otherwise returns immediately after opening the device and writing the data into it. Use the following code to verify if writing is complete: if (waveStream.getDataAvailable(true) > chunkSize) then ...
This function sets realTime and isInput properties to false.

property TunavclWaveRiff.waveStream: unaRiffStream;

Returns Riff wave device.

property TunavclWaveRiff.realTime: [unknown];

Specifies whether reading and writing should be done in real time.

property TunavclWaveRiff.loop: [unknown];

Specifies whether reading should continue from the start upon reaching the end of file.

property TunavclWaveRiff.formatTagImmunable: [unknown];

WaveWriter usually does not use the format tag provided by other PCM devices.

property TunavclWaveRiff.formatTag: [unknown];

Use this property to specify wave format of non-PCM WAVe files you wish to create.

property TunavclWaveRiff.calcVolume: [unknown];

property TunavclWaveRiff.isInput: bool;

Specifies whether Riff wave device is used for reading or writing the audio.

property TunavclWaveRiff.fileName: string;

Specifies file to use with Riff wave device.

property TunavclWaveRiff.autoCloseOnDone: bool;

When true, closes the device automatically when reading from file is complete.

property TunavclWaveRiff.enableDataProcessing: [unknown];

Specifies whether the component would produce or accept any data.

property TunavclWaveRiff.silenceDetectionMode: [unknown];

Specifies how component should detect silence.

property TunavclWaveRiff.onStreamIsDone: unaOnRiffStreamIsDone;

Fired when reading from file is complete. Never fired if loop property is set to true.

Class TunavclWaveMixer(unavclInOutWavePipe)

Purpose: mixes two or more PCM audio streams. No ACM codecs are used by this component.

Usage: If components has no provider component with formatProvider=true, specify PCM stream parameters before activating: set pcm_SamplesPerSec, pcm_BitsPerSample and pcm_NumChannels to specify the audio format parameters. Set realTime to true if you wish the mixing to be made in real time manner. This component will mix as many streams as it has providers. Provider is any VC component, which has consumer property set to mixer component. Alternatively you can use addStream() and removeStream() method to add and remove streams (see Example B below).

Example A: c_mixer_client and c_mixer_server components are used in vcNetTalk demo to mix PCM streams coming from live recording device and WAVe file stored on disk.

Example B: mixer is used in vcPulseGen demo to mix unlimited number of sine waves. Refer to demo sources for details.

procedure TunavclWaveMixer.doSetAddSilence(value: bool); override;

function TunavclWaveMixer.doWrite(data: pointer; len: unsigned; provider: unavclInOutPipe = nil): unsigned; override;

Writes data into mixer.

procedure TunavclWaveMixer.createNewDevice(); override;

Creates PCM wave mixer device.

function TunavclWaveMixer.doAddProvider(provider: unavclInOutPipe): bool; override;

Applies audio stream format on PCM wave mixer device.

procedure TunavclWaveMixer.doRemoveProvider(provider: unavclInOutPipe); override;

procedure TunavclWaveMixer.AfterConstruction(); override;

procedure TunavclWaveMixer.BeforeDestruction(); override;

property TunavclWaveMixer.mixer: unaWaveMixerDevice;

Returns PCM wave mixer device class instance.

property TunavclWaveMixer.addSilence: [unknown];

property TunavclWaveMixer.realTime: [unknown];

property TunavclWaveMixer.calcVolume: [unknown];

property TunavclWaveMixer.enableDataProcessing: [unknown];

Specifies whether the component would perform any data mixing.

property TunavclWaveMixer.silenceDetectionMode: [unknown];

Specifies how component should detect silence.

Class TunavclWaveResampler(unavclInOutWavePipe)

Purpose: audio stream conversion from one PCM format to another. No ACM codecs are used by this component.

Usage: If components has no provider component with formatProvider=true, specify PCM stream parameters before activating: set pcm_SamplesPerSec, pcm_BitsPerSample and pcm_NumChannels to specify the source format parameters. Set dst_SamplesPerSec, dst_BitsPerSample and dst_NumChannels properties to specify the destination stream format parameters. Set realTime to true if you wish the resampling to be made in real time manner.

Example: c_resampler_client and c_resampler_server components are used in vcNetTalk demo for resampling the streams produced by WAV-reading components to PCM parameters required by mixers.

procedure TunavclWaveResampler.createNewDevice(); override;

Creates PCM wave resampler device.

function TunavclWaveResampler.applyDeviceFormat(const format: WAVEFORMATEX; isSrc: bool = true): bool; override;

Applies new audio format for PCM wave resampler device.

function TunavclWaveResampler.getFormatExchangeData(out data: pointer): unsigned; override;

procedure TunavclWaveResampler.AfterConstruction(); override;

property TunavclWaveResampler.resampler: unaWaveResampler;

Returns PCM resampler device.

property TunavclWaveResampler.dstFormat: pWAVEFORMATEX;

Specifies destination PCM format of resampler device.

property TunavclWaveResampler.addSilence: [unknown];

property TunavclWaveResampler.realTime: [unknown];

property TunavclWaveResampler.calcVolume: [unknown];

property TunavclWaveResampler.dst_SamplesPerSec: unsigned;

Specifies number of sampler per second for destination PCM format of resampler device.

property TunavclWaveResampler.dst_BitsPerSample: unsigned;

Specifies number of bits per sample for destination PCM format of resampler device.

property TunavclWaveResampler.dst_NumChannels: unsigned;

Specifies number of channels per sample for destination PCM format of resampler device.

property TunavclWaveResampler.enableDataProcessing: [unknown];

Specifies whether the component would perform any data modifications.

property TunavclWaveResampler.silenceDetectionMode: [unknown];

Specifies how component should detect silence.

Class unavclInOutIpPipe(unavclInOutPipe)

Base abstract class for TCP/IP stream devices.

function unavclInOutIpPipe.doSendPacket(connId: unsigned; cmd: unsigned; data: pointer = nil; len: unsigned = 0; timeout: unsigned = 79): tunaSendResult; virtual; abstract;

Sends a packet to remote side.

procedure unavclInOutIpPipe.doOnSocketEvent(sender: tObject; event: unaSocketEvent; id, connId: unsigned; data: pointer; len: unsigned); virtual;

Fired by underlying socket provider. See also handleSocketEvent().

function unavclInOutIpPipe.isActive(): bool; override;

Returns active state of the TCP/IP stream.

function unavclInOutIpPipe.doWrite(data: pointer; len: unsigned; provider: unavclInOutPipe = nil): unsigned; override;

Should write data into the TCP/IP stream.

function unavclInOutIpPipe.doRead(data: pointer; len: unsigned): unsigned; override;

You cannot read from a socket.
Use onDataAvailable event or override the onNewData() method to be notified when new data arrives.

This method always returns 0.

function unavclInOutIpPipe.getAvailableDataLen(index: int): unsigned; override;

This method always returns 0.

procedure unavclInOutIpPipe.sendGoodbye(); virtual; abstract;

Sends goodbye command to all underlying connections.

function unavclInOutIpPipe.doOpen(): bool; override;

Opens the TCP/IP stream.

procedure unavclInOutIpPipe.doClose(); override;

Closes the TCP/IP stream.

function unavclInOutIpPipe.doEnter(timeOut: unsigned = 1000): bool; override;

procedure unavclInOutIpPipe.doLeave(); override;

function unavclInOutIpPipe.getFormatExchangeData(out data: pointer): unsigned; override;

function unavclInOutIpPipe.onNewPacketData(dataType: int; data: pointer; len: unsigned): bool; virtual;

Triggers when new packet is available for the TCP/IP stream.

function unavclInOutIpPipe.onNewPacket(cmd: unsigned; data: pointer; len: unsigned; connId: unsigned): bool; virtual;

function unavclInOutIpPipe.initSocksThread(): unsigned; virtual; abstract;

Initializes the TCP/IP stream socket.

function unavclInOutIpPipe.handleSocketEvent(event: unaSocketEvent; id, connId: unsigned; data: pointer; len: unsigned): bool; virtual;

Handles socket event.

function unavclInOutIpPipe.applyFormat(data: pointer; len: unsigned; provider: unavclInOutPipe = nil; restoreActiveState: bool = false): bool; override;

Since IP components sends and receives format from remote side, we should not bother local consumers, as it is done in parent's applyFormat(), unless we had received a remote format

property unavclInOutIpPipe.host: string;

Specifies host name (or IP address) for the client TCP/IP socket.

property unavclInOutIpPipe.bindToPort: string;

Specifies port name/number to bind to when socket is about to be open (either for listening or for connection). Default is '0' which means socket will bind to first available port.

procedure unavclInOutIpPipe.AfterConstruction(); override;

procedure unavclInOutIpPipe.BeforeDestruction(); override;

function unavclInOutIpPipe.getClientConnection(): [unknown];

Returns client connection object. NOTE! Connection's release() method must be called when connection object is no longer needed.

function unavclInOutIpPipe.getErrorCode(): unsigned;

function unavclInOutIpPipe.sendPacket(connId: unsigned; cmd: unsigned; data: pointer = nil; len: unsigned = 0; timeout: unsigned = 80): tunaSendResult;

Sends a packet into the IP stream.

function unavclInOutIpPipe.sendText(connId: unsigned; const data: string): tunaSendResult;

Sends a text into the IP stream.

function unavclInOutIpPipe.sendData(connId: unsigned; data: pointer; len: unsigned): tunaSendResult;

Sends user data into the IP stream.

property unavclInOutIpPipe.inPacketsCount: int64;

Returns number of packets received.

property unavclInOutIpPipe.outPacketsCount: int64;

Returns number of packets sent.

property unavclInOutIpPipe.inPacketsCrcErrors: unsigned;

property unavclInOutIpPipe.inPacketsDupCount: unsigned;

property unavclInOutIpPipe.inPacketsOutOfSeq: unsigned;

property unavclInOutIpPipe.bytesSent: int64;

property unavclInOutIpPipe.bytesReceived: int64;

property unavclInOutIpPipe.socksId: unsigned;

property unavclInOutIpPipe.useIOCPSocketsModel: bool;

property unavclInOutIpPipe.socks: unaSocks;

property unavclInOutIpPipe.localFormat: punavclWavePipeFormatExchange;

property unavclInOutIpPipe.remoteFormat: punavclWavePipeFormatExchange;

property unavclInOutIpPipe.port: string;

Specifies port number for the client/server TCP/IP socket.

property unavclInOutIpPipe.proto: tunavclProtoType;

Specifies Proto for the TCP/IP socket (TCP or UDP).

property unavclInOutIpPipe.bindTo: string;

Specifies IP address to bind to when socket is about to be open (either for listening or for connection). Default is '0.0.0.0' which means socket will bind to first available interface.

property unavclInOutIpPipe.streamingMode: tunavclStreamingMode;

Specifies the low-level streaming mode.

property unavclInOutIpPipe.streamByteOrderInput: tunavclStreamByteOrder;

Specifies how to analyze the byte order and position in received data when doing PCM raw streaming. It could leave bytes as they are, always swap, or autodetect the order. Default is unasbo_dontCare (leave bytes as they are). Has meaning for RAW uncompressed streaming only.

property unavclInOutIpPipe.streamByteOrderOutput: tunavclStreamByteOrder;

Specifies how to analyze the byte order and position in data being sent when doing PCM raw streaming. It could leave bytes as they are, always swap, or autodetect the order. Default is unasbo_dontCare (leave bytes as they are). Has meaning for RAW uncompressed streaming only.

property unavclInOutIpPipe.onTextData: tunavclTextDataEvent;

Triggers when text data is available.
NOTE: VCL is NOT multi-threading safe, and you should avoid using VCL routines and classes in this event.

property unavclInOutIpPipe.onUserData: tunavclUserDataEvent;

Triggers when user data is available.
NOTE: VCL is NOT multi-threading safe, and you should avoid using VCL routines and classes in this event.

property unavclInOutIpPipe.onPacketEvent: tunavclPacketEvent;

Triggers when new packet is available.
NOTE: VCL is NOT multi-threading safe, and you should avoid using VCL routines and classes in this event.

property unavclInOutIpPipe.onSocketEvent: tunavclSocketEvent;

Triggers when socket event occurs.

property unavclInOutIpPipe.onDataSent: tunavclUserDataEvent;

Triggers when new portion of data was sent to remote host.

Class TunavclIPOutStream(unavclInOutIpPipe)

IPClient

Purpose: connects to remote server, sends and receives audio stream over TCP/IP network.

Usage: set host, proto and port properties to specify the remote host. Set active to true or call the open() method to initiate the connection.

Example: refer to vcTalkNow demo, with ip_client it is possible to send compressed audio stream over network and receive audio stream from remote server for playback.

function TunavclIPOutStream.doWrite(data: pointer; len: unsigned; provider: unavclInOutPipe = nil): unsigned; override;

Writes data into the TCP/IP stream to be sent to server.

function TunavclIPOutStream.doSendPacket(connId: unsigned; cmd: unsigned; data: pointer = nil; len: unsigned = 0; timeout: unsigned = 81): tunaSendResult; override;

Sends a packet to server.

procedure TunavclIPOutStream.sendGoodbye(); override;

Sends goodbye command to server.

function TunavclIPOutStream.initSocksThread(): unsigned; override;

function TunavclIPOutStream.handleSocketEvent(event: unaSocketEvent; id, connId: unsigned; data: pointer; len: unsigned): bool; override;

function TunavclIPOutStream.onNewPacket(cmd: unsigned; data: pointer; len: unsigned; connId: unsigned): bool; override;

function TunavclIPOutStream.isActive(): bool; override;

Returns active state of IP Client.

procedure TunavclIPOutStream.AfterConstruction(); override;

procedure TunavclIPOutStream.BeforeDestruction(); override;

property TunavclIPOutStream.clientConnId: unsigned;

Client socket connection Id.

property TunavclIPOutStream.isConnected: bool;

Returns true if client socket is connected to remote host

property TunavclIPOutStream.bindToPort: [unknown];

Local port number client should bind to. 0 means client will let system to select any free port.

property TunavclIPOutStream.host: [unknown];

Remote host number to connect to.

property TunavclIPOutStream.onClientConnect: tunavclConnectEvent;

Triggers when client has been connected to the server.
NOTE: VCL is NOT multi-threading safe, and you should avoid using VCL routines and classes in this event.

property TunavclIPOutStream.onClientDisconnect: tunavclConnectEvent;

Triggers when client has been disconnected from the server.
NOTE: VCL is NOT multi-threading safe, and you should avoid using VCL routines and classes in this event.

Class TunavclIPInStream(unavclInOutIpPipe)

IPServer

Purpose: initiates listening socket for clients to connect to. Receives and sends audio stream to/from client.

Usage: set proto and port properties to specify the socket parameters. Set active to true or call the open() method to initiate the server.

Example: refer to vcTalkNow demo, with ip_server it is possible to accept client connections, receive compressed audio stream and send audio stream over network.

function TunavclIPInStream.doWrite(data: pointer; len: unsigned; provider: unavclInOutPipe = nil): unsigned; override;

Writes data into the TCP/IP stream to be sent to client(s).

procedure TunavclIPInStream.doClose(); override;

Closes the IP server.

function TunavclIPInStream.doSendPacket(connId: unsigned; cmd: unsigned; data: pointer = nil; len: unsigned = 0; timeout: unsigned = 82): tunaSendResult; override;

Sends a packet to specified client.

procedure TunavclIPInStream.sendGoodbye(); override;

Sends goodbye command to all active clients.

function TunavclIPInStream.initSocksThread(): unsigned; override;

function TunavclIPInStream.handleSocketEvent(event: unaSocketEvent; id, connId: unsigned; data: pointer; len: unsigned): bool; override;

function TunavclIPInStream.onNewPacket(cmd: unsigned; data: pointer; len: unsigned; connId: unsigned): bool; override;

procedure TunavclIPInStream.doAcceptClient(connId: unsigned; var accept: bool); virtual;

procedure TunavclIPInStream.doServerClientConnection(connId: unsigned; isConnected: bool); virtual;

procedure TunavclIPInStream.addDeadSocket(connId: unsigned);

procedure TunavclIPInStream.AfterConstruction(); override;

procedure TunavclIPInStream.BeforeDestruction(); override;

function TunavclIPInStream.getClientConnId(clientIndex: unsigned): unsigned;

Returns clientId for given index. clientIndex may be from 0 to clientCount - 1.

procedure TunavclIPInStream.setClientOptions(clientIndex: unsigned; options: unsigned = c_unaIPServer_co_default);

function TunavclIPInStream.getClientOptions(clientIndex: unsigned): unsigned;

property TunavclIPInStream.clientCount: unsigned;

Number of clients currently connected to server.

property TunavclIPInStream.clientOptions[]: unsigned;

property TunavclIPInStream.packetStackThreadEnabled: bool;

property TunavclIPInStream.onServerNewClient: tunavclConnectEvent;

Triggers when new client is connected to the server.
NOTE: VCL is NOT multi-threading safe, and you should avoid using VCL routines and classes in this event.

property TunavclIPInStream.onServerClientDisconnect: tunavclConnectEvent;

Triggers when client is disconnected from the server.
NOTE: VCL is NOT multi-threading safe, and you should avoid using VCL routines and classes in this event.

property TunavclIPInStream.isFormatProvider: [unknown];

IP server is usually a format provider - so this property value was changed to be true by default.

property TunavclIPInStream.confMode: unaIpServerConferenceMode;

Conference mode (not used).

property TunavclIPInStream.maxClients: int;

Max. number of clients allowed. Specify -1 for unlimited number.

property TunavclIPInStream.udpTimeout: unsigned;

Timeout for clients "connected" to UDP server. 0 means no timeout.

property TunavclIPInStream.onAcceptClient: tunavclAcceptClient;

Fired when new client is connected. Leave accept true for client to be connected.

Class unavclIPBroadcastPipe(unavclInOutPipe)

Implements basic abstract broadcast pipe.

function unavclIPBroadcastPipe.doRead(data: pointer; len: unsigned): unsigned; override;

Reads data from pipe.

function unavclIPBroadcastPipe.getAvailableDataLen(index: int): unsigned; override;

Returns 0.

function unavclIPBroadcastPipe.doOpen(): bool; override;

Opens a pipe.

procedure unavclIPBroadcastPipe.doClose(); override;

Closes a broadcast pipe.

function unavclIPBroadcastPipe.isActive(): bool; override;

Returns active state of a pipe.

function unavclIPBroadcastPipe.doEnter(timeOut: unsigned = 1000): bool; override;

Enters a pipe gate.

procedure unavclIPBroadcastPipe.doLeave(); override;

Leaves pipe gate.

function unavclIPBroadcastPipe.getFormatExchangeData(out data: pointer): unsigned; override;

Returns format exchange packet.

function unavclIPBroadcastPipe.applyFormat(data: pointer; len: unsigned; provider: unavclInOutPipe = nil; restoreActiveState: bool = false): bool; override;

Applies format on a pipe.

procedure unavclIPBroadcastPipe.bindSocket(); virtual;

Binds socket on a port (client) or broadcast address (server).

procedure unavclIPBroadcastPipe.doSetPort(const value: string); virtual;

Sets the port for broadcast socket.

procedure unavclIPBroadcastPipe.AfterConstruction(); override;

Creates a broadcast pipe.

procedure unavclIPBroadcastPipe.BeforeDestruction(); override;

Destroys broadcast pipe.

procedure unavclIPBroadcastPipe.setBroadcastAddr();

Sets the specific broadcast address.

property unavclIPBroadcastPipe.waveFormatTag: unsigned;

Specifies format tag of pipe audio stream.

property unavclIPBroadcastPipe.waveSamplesPerSec: unsigned;

Specifies samples per second for pipe audio stream.

property unavclIPBroadcastPipe.waveNumChannels: unsigned;

Specifies number of channels for pipe audio stream.

property unavclIPBroadcastPipe.waveNumBits: unsigned;

Specifies number of bits for pipe audio stream.

property unavclIPBroadcastPipe.port: string;

Specifies port number for broadcast socket.

property unavclIPBroadcastPipe.bindTo: string;

Specifies IP address the socket should bind to. Default '0.0.0.0' means socket should bind to first available interface.

Class TunavclIPBroadcastServer(unavclIPBroadcastPipe)

Purpose: broadcasts audio stream over LAN using the broadcast destination IP address and UDP sockets.

Usage: set the port property to specify the port number to broadcast to. Calling the open() method or setting the active property to true will initiate broadcasting.

Example: refer to vcBroadcast demo for details.

procedure TunavclIPBroadcastServer.bindSocket(); override;

function TunavclIPBroadcastServer.doWrite(data: pointer; len: unsigned; provider: unavclInOutPipe = nil): unsigned; override;

Writes data into broadcast stream.

function TunavclIPBroadcastServer.doOpen(): bool; override;

function TunavclIPBroadcastServer.sendStreamData(channelMedia: byte; data: pointer = nil; len: unsigned = 0; isNewChunk: bool = true): tunaSendResult;

Sends a specified media packet. Only audio packets are currently supported. Returns 0 if data was sent successfully, or socket error otherwise.

function TunavclIPBroadcastServer.sendAudioStreamFormat(): tunaSendResult;

Sends an audio stream format to client(s).

function TunavclIPBroadcastServer.sendStreamSync(sync: unsigned): tunaSendResult;

Sends stream synchronization (not implemented yet).

function TunavclIPBroadcastServer.sendCustomData(customType: byte; data: pointer; len: unsigned): tunaSendResult;

Sends custom data over a pipe.

property TunavclIPBroadcastServer.packetsSent: unsigned;

Returns number of total packets being sent.

Class TunavclIPBroadcastClient(unavclIPBroadcastPipe)

Purpose: receives audio stream being broadcasted by server component over LAN.

Usage: set the port property to specify the port number to listen at for stream being broadcasted. Calling the open() method or setting the active property to true will initiate listening. As soon as broadcast packets will be received, this component can produce output stream to be played back. No data will be send back to server.

Example: refer to vcBroadcast demo for details.

procedure TunavclIPBroadcastClient.doClose(); override;

function TunavclIPBroadcastClient.doOpen(): bool; override;

function TunavclIPBroadcastClient.doEnter(timeOut: unsigned = 1000): bool; override;

procedure TunavclIPBroadcastClient.doLeave(); override;

procedure TunavclIPBroadcastClient.bindSocket(); override;

procedure TunavclIPBroadcastClient.doSetPort(const value: string); override;

procedure TunavclIPBroadcastClient.AfterConstruction(); override;

procedure TunavclIPBroadcastClient.BeforeDestruction(); override;

property TunavclIPBroadcastClient.packetsLost: unsigned;

Returns total number of packets being lost.

property TunavclIPBroadcastClient.packetsReceived: unsigned;

Returns number of received packets.

property TunavclIPBroadcastClient.remoteHost: unsigned;

Remote host.

property TunavclIPBroadcastClient.remotePort: word;

Remote port.

property TunavclIPBroadcastClient.isFormatProvider: [unknown];

Broadcast client is usually a format provider - so this property value was changed to be true by default.

Class TunavclScriptor(tComponent)

The syntax of VC 2.5 Pro script is simple.

1) components creation
2) assigning property value
3) special commands
4) general syntax issues


----------------------
1) components creation
----------------------

To create a component, specify component's name and the base class you with to create:

<componentName> = <baseClassName>

For example, to create the recording device use the following operator:

myRecorder = TunavclWaveInDevice;

The following base class names are supported:

  // wave classes
  //
  TunavclWaveInDevice 	 - wave in device (recorder) component
  TunavclWaveOutDevice 	 - wave out device (playback) component

  TunavclWaveCodecDevice - Audio Compression Manager (ACM) codec device component
  TunavclWaveRiff	 - WAVe reader and writer component
  TunavclWaveMixer	 - PCM mixer device component
  TunavclWaveResampler	 - PCM resampler device component

  // IP classes
  //
  TunavclIPOutStream	 - IP (TCP or UDP) client component
  TunavclIPInStream	 - IP (TCP or UDP) server component

  TunavclIPBroadcastClient - IP (UDP) broadcast client component
  TunavclIPBroadcastServer - IP (UDP) broadcast server component


----------------------------
2) assigning property values
----------------------------

To assign a value for component property, use the following operator:

<componentName>.<propertyName> = <value>;

Following properties are supported:

     'className',		// RO: string	 - all classes
     'name',			// RW: string	 - all classes

     'availableDataLenIn',	// RO: unsigned	 - all VC classes
     'availableDataLenOut',	// RO: unsigned	 - all VC classes
     'inBytes',			// RO: int64	 - all VC classes
     'outBytes',		// RO: int64	 - all VC classes

     'active',			// RW: bool	 - all VC classes
     'consumer',		// RW: component - all VC classes
     'dumpInput',		// RW: strign	 - all VC classes
     'dumpOutput',		// RW: string	 - all VC classes
     'isFormatProvider',	// RW: bool      - all VC classes
     'autoActivate',		// RW: bool      - all VC classes

     'onDataAvailable',		// RW: event	 - all VC classes

     'deviceId',		// RW: integer   - all VC WAVE classes
     'formatTag',		// RW: unsigned  - all VC WAVE classes
     'formatTagImmunable',	// RW: bool      - all VC WAVE classes
     'mapped',			// RW: bool      - all VC WAVE classes
     'direct',			// RW: bool      - all VC WAVE classes
     'overNum',			// RW: unsigned  - all VC WAVE classes
     'realTime',		// RW: bool      - all VC WAVE classes
     'loop',                    // RW: bool      - all VC WAVE classes
     'inputIsPcm',		// RW: bool      - all VC WAVE classes
     'pcm_SamplesPerSec',	// RW: unsigned  - all VC WAVE classes
     'pcm_BitsPerSample',	// RW: unsigned  - all VC WAVE classes
     'pcm_NumChannels',		// RW: unsigned  - all VC WAVE classes
     'calcVolume',		// RW: bool      - all VC WAVE classes

     'addSilence',		// RW: bool     - TunavclMixer and TunavclResampler

     'minActiveTime',		// RW: unsigned - TunavclWaveInDevice
     'minVolumeLevel',		// RW: unsigned - TunavclWaveInDevice

     'isInput',			// RW: bool     - TunavclWaveRiff
     'fileName',		// RW: string   - TunavclWaveRiff

     'dst_SamplesPerSec',	// RW: unsigned - TunavclWaveResampler
     'dst_BitsPerSample',       // RW: unsigned - TunavclWaveResampler
     'dst_NumChannels',         // RW: unsigned - TunavclWaveResampler

     'port',			// RW: string   - all VC IP classes

     'host',			// RW: string   - all VC TCP/IP classes
     'proto',			// RW: string   - all VC TCP/IP classes

     'waveFormatTag',		// RW: unsigned - all VC UDP BROADCAST classes
     'waveSamplesPerSec',	// RW: unsigned - all VC UDP BROADCAST classes
     'waveNumChannels',		// RW: unsigned - all VC UDP BROADCAST classes
     'waveNumBits',		// RW: unsigned - all VC UDP BROADCAST classes

     'packetsSent',		// RO: unsigned - TunavclIPBroadcastServer

     'packetsLost',		// RO: unsigned - TunavclIPBroadcastClient
     'packetsReceived',		// RO: unsigned - TunavclIPBroadcastClient
     'remoteHost',		// RO: unsigned - TunavclIPBroadcastClient
     'remotePort'		// RO: unsigned - TunavclIPBroadcastClient


To specify boolean value, use 'true' and 'false' keywords, for example:

  myRecorder.active = true;

This assigns boolean value 'true' to the active property of myRecorder component.

To specify string value, enclose it into ' ' (single quotes). Double single quote ('') inside the string indicates one single quote.
proto property can has 'TCP' or 'UDP' values only.

You can reference the created component by specifying it's name:

  myPlayback = TunavclWaveOutDevice;
  myRecorder.consumer = myPlayback;

You can also use null keyword to remove the consumer or destroy the component:

  myRecorder.consumer = null;	// assigns nil to consumer (removes consumer)
  myPlayback = null;		// destroys myPlayback component

-------------------
3) special commands
-------------------

There are also several commands which executes some special action:

  <command>;

Following commands are supported:

  clear;		// clears all created components
  pause;		// pauses execution of script for 1 second


------------------------
4) general syntax issues
------------------------

All operators, component names and keywords are NOT case sensitive.

Operators must be terminated by ";" symbol.

Comments should be enclosed in { } pair, or started with // sequence.

procedure TunavclScriptor.Notification(component: tComponent; operation: tOperation); override;

procedure TunavclScriptor.AfterConstruction(); override;

destructor TunavclScriptor.Destroy(); override;

function TunavclScriptor.executeScript(const script: string): HRESULT;

Executes script. Returns S_OK if no error ocurred.

function TunavclScriptor.getErrorCodeString(code: HRESULT): string;

Returns error string for specified error code.

function TunavclScriptor.getComponentProperty(const componentName, propertyName: string; out value: string): HRESULT;

Returns component property value.

function TunavclScriptor.setComponentProperty(const componentName, propertyName: string; const value: string): HRESULT;

Sets component property value.

function TunavclScriptor.getComponentName(index: unsigned; out componentName: string): HRESULT;

Returns component name by component index.

property TunavclScriptor.errorLine: unsigned;

Line number where error ocurred.

property TunavclScriptor.componentCount: unsigned;

Number of components.

property TunavclScriptor.onScriptExecute: tNotifyEvent;

Fired before script is about to be executed.


Unit routines

procedure unaVCIDE.unavclPipeDataEvent(sender: unavclInOutPipe; data: point