TACSFileIn Properties


EndSample : Integer;

Use this property to set the number of the end sample in the file that the playback should stop at. The value of -1 (default) tells the component to play the file up to the end. The sample in this context means the minimum playable portion of audio data. For mono 8-bit sound 1 sample = 1 byte, while for stereo 16-bit sound 1 sample = 4 bytes. You can get the total number of samples in the file by reading TotalSamples property.

Note that in some cases (for example, with ADPCM files) sample positioning is not quite precise.


FileName : TFileName;

Use this property to set the name of the file to read data from.

See also: Stream property.


Loop : Boolean;

The default value of Loop is False. If this property is set to True, the file playback will be looped, in other words the file will start playing again right after it is finished. Note, that if Loop is set to True, it will not present end conditions to the corresponding output component. You can stop the looped input component either by setting Loop to False, or by calling Stop method of the corresponding output component.


StartSample : Integer;

Use this property to set the number of the sample in the file that the playback should start from. The value of 0 (default) tells the component to play the file from the beginning. The sample in this context means the minimum playable portion of audio data. For mono 8-bit sound 1 sample = 1 byte, while for stereo 16-bit sound 1 sample = 4 bytes. You can get the total number of samples in the file by reading TotalSamples property.

Note that in some cases (for example, with ADPCM files) sample positioning is not quite precise.


Time : Integer;

Readonly

Read this property to determine the total playing time of the file in seconds.


TotalSamples : Integer;

Readonly

Use this property to read the total number of samples in the file/stream assigned to the component. The sample in this context means the minimum playable portion of audio data. For mono 8-bit sound 1 sample = 1 byte, while for stereo 16-bit sound 1 sample = 4 bytes.


Valid : Boolean;

Readonly

Read this property to determine if the file is valid. It is a good practice to check this property before performing other operations on audio stream.


TACSFileIn ACS Classes Home


Copyright © 2002, 2003 Andrei Borovsky. All rights reserved.