etRecord.Source.Format Properties


etRecord.Source.Format properties are used to define the attributes of the wave file and the wave data to be recorded.

TeleTools has predefined formats available for your convenience and will not limit you from using any format that your wave audio device supports.

To select a predefined format, modify the etRecord.Source.FormatID or etRecord.Source.Format.Name property. The following properties are updated and should not be changed:

     etRecord.Source.Format.AvgBytesPerSec
     etRecord.Source.Format.BitsPerSample
     etRecord.Source.Format.BlockAlign
     etRecord.Source.Format.Channels
     etRecord.Source.Format.SamplesPerSec
     etRecord.Source.Format.Tag

When using a format other than one of the predefined you will notice that the etPlay.SourceFormatID and etRecord.SourceFormatID properties will have the value "wfUnknown". The etPlay.SourceFormatName and etRecord.SourceFormatName properties will have the value "Unknown".

Source.Format.Name

Source.Format.ID

Unknown

wfUnknown

PCM 8,000 Hz, 8-bit, Mono

wfPCM08000M08

PCM 8,000 Hz, 8-bit, Stereo

wfPCM08000S08

PCM 8,000 Hz, 16-bit, Mono

wfPCM08000M16

PCM 8,000 Hz, 16-bit, Stereo

wfPCM08000S16

PCM 11,025 Hz, 8-bit, Mono

wfPCM11025M08

PCM 11,025 Hz, 8-bit, Stereo

wfPCM11025S08

PCM 11,025 Hz, 16-bit, Mono

wfPCM11025M16

PCM 11,025 Hz, 16-bit, Stereo

wfPCM11025S16

PCM 22,050 Hz, 8-bit, Mono

wfPCM22050M08

PCM 22,050 Hz, 8-bit, Stereo

wfPCM22050S08

PCM 22,050 Hz, 16-bit, Mono

wfPCM22050M16

PCM 22,050 Hz, 16-bit, Stereo

wfPCM22050S16

PCM 44,100 Hz, 8-bit, Mono

wfPCM44100M08

PCM 44,100 Hz, 8-bit, Stereo

wfPCM44100S08

PCM 44,100 Hz, 16-bit, Mono

wfPCM44100M16

PCM 44,100 Hz, 16-bit, Stereo

wfPCM44100S16

uLaw 6,000 Hz, 8-bit, Mono

wfuLaw06000M08

uLaw 8,000 Hz, 8-bit, Mono

wfuLaw08000M08

ADPCM 6,000 Hz, 4-bit, Mono

wfADPCM06000M04

ADPCM 8,000 Hz, 4-bit, Mono

wfADPCM08000M04

IMA_ADPCM 4,800 Hz, 4-bit, Mono

wfIMAADPCM04800M04

IMA_ADPCM 7,200 Hz, 4-bit, Mono

wfIMAADPCM07200M04

IMA_ADPCM 8,000 Hz, 4-bit, Mono

wfIMAADPCM08000M04

 

When recording in a format other than one of those predefined in TeleTools, set the values for the following properties:

     etRecord.Source.Format.AvgBytesPerSec
     etRecord.Source.Format.BitsPerSample
     etRecord.Source.Format.BlockAlign
     etRecord.Source.Format.Channels
     etRecord.Source.Format.SamplesPerSec
     etRecord.Source.Format.Tag

Do not set the property etRecord.SourceFormatID to wfUnknown. When any of the these properties are modified etRecord checks to see if the combination matches one of the predefined formats then sets the properties etRecord.SourceFormatID and etRecord.SourceFormatName.

If you have a wave file in the format you wish use but are unsure of its attributes, use the TeleScope program to find the format information. Select the menu option "TeleScope | etPlay" to display the etPlay TeleScope. Click on the "Source" tab and set the etPlay.SourceFileName property to the wave file. The following etPlay.SourceFormat properties will contain the settings required to record in the same format:

     etPlay.Source.Format.AvgBytesPerSec
     etPlay.Source.Format.BitsPerSample
     etPlay.Source.Format.BlockAlign
     etPlay.Source.Format.Channels
     etPlay.Source.Format.SamplesPerSec
     etPlay.Source.Format.Tag
 


Source.Format.AvgBytesPerSec
Source.Format.BitsPerSample
Source.Format.BlockAlign
Source.Format.Bytes
Source.Format.Channels
Source.Format.ID
Source.Format.Name
Source.Format.SamplesPerSec
Source.Format.Seconds
Source.Format.Tag


etRecord.Source.Format.AvgBytesPerSec

ActiveX: etRecord.SourceFormatAvgBytesPerSec
Type:
Integer
When:
Design-Time and Run-Time
Read/Write:
Read and Write
Edition:
Standard, Professional, Enterprise
Required average data transfer rate, in bytes per second. For example, 16-bit stereo at 44.1 kHz has an average data rate of 176,400 bytes per second (2 channels — 2 bytes per sample per channel — 44,100 samples per second).

etRecord.Source.Format.BitsPerSample

ActiveX: etRecord.SourceFormatBitsPerSample
Type:
Integer
When:
Design-Time and Run-Time
Read/Write:
Read and Write
Edition:
Standard, Professional, Enterprise
This number of bits per sample.

etRecord.Source.Format.BlockAlign

ActiveX: etRecord.SourceFormatBlockAlign
Type:
Integer
When:
Design-Time and Run-Time
Read/Write:
Read and Write
Edition:
Standard, Professional, Enterprise
Block alignment, in bytes. The block alignment is the minimum atomic unit of data. For PCM data, the block alignment is the number of bytes used by a single sample, including data for both channels if the data is stereo. For example, the block alignment for 16-bit stereo PCM is 4 bytes (2 channels — 2 bytes per sample).

etRecord.Source.Format.Bytes

ActiveX: etRecord.SourceFormatBytes
Type:
Integer
When:
Run-Time
Read/Write:
Read Only
Edition:
Standard, Professional, Enterprise
This indicates the size of the recorded information in bytes. This value will increase with each interval of the etRecord.Device.Buffer because each time the audio device releases a buffer it is added to the etRecord internal buffer.

etRecord.Source.Format.Channels

ActiveX: etRecord.SourceFormatChannels
Type:
Integer
When:
Design-Time and Run-Time
Read/Write:
Read and Write
Edition:
Standard, Professional, Enterprise
Number of channels in the waveform-audio data. Mono data uses one channel and stereo data uses two channels. Virtually all audio devices associated with a telephony device are mono.

etRecord.Source.Format.ID

ActiveX: etRecord.SourceFormatID
Type:
TWAVFORMATS
When:
Design-Time and Run-Time
Read/Write:
Read and Write
Edition:
Standard, Professional, Enterprise
<Click here for example>

This is the TeleTools predefined format of the wave file. See the table above.

etRecord.Source.Format.Name

ActiveX: etRecord.SourceFormatName
Type:
String
When:
Design-Time and Run-Time
Read/Write:
Read and Write
Edition:
Standard, Professional, Enterprise
This is the TeleTools predefined format of the wave file. See the table above.

etRecord.Source.Format.SamplesPerSec

ActiveX: etRecord.SourceFormatSamplesPerSec
Type:
Integer
When:
Design-Time and Run-Time
Read/Write:
Read and Write
Edition:
Standard, Professional, Enterprise
Sample rate, in samples per second.

etRecord.Source.Format.Seconds

ActiveX: etRecord.SourceFormatSeconds
Type:
Single
When:
Run-Time
Read/Write:
Read Only
Edition:
Standard, Professional, Enterprise
This indicates the size of the recorded information in seconds. This value will increase with each interval of the etRecord.Device.Buffer because each time the audio device releases a buffer it is added to the etRecord internal buffer.

etRecord.Source.Format.Tag

ActiveX: etRecord.SourceFormatTag
Type:
Integer
When:
Design-Time and Run-Time
Read/Write:
Read and Write
Edition:
Standard, Professional, Enterprise
Format type. For example, WAVE_FORMAT_PCM Waveform-audio data is PCM.



etRecord Properties - Source