Device.Active
Device.CODECsEnabled
Device.Count
Device.Delay
Device.ID
Device.List
Device.Loop
Device.Name
Device.Pause
Device.Timeout
Device.Wait
ActiveX: etPlay.DeviceActive
Type: Boolean
When: Design-Time and Run-Time
Read/Write: Read and Write
Edition: Standard, Professional, Enterprise
<Click
here for example>
This property is used to start and stop playing a wave file. To begin playing set this property to True. To stop playing set the value to False. The audio device is freed and the wave data is released.
Prior to setting the value of this property to True make sure that the etPlay.Device.ID and/or etPlay.Device.Name properties are set to the correct audio device. Also make sure that the etPlay.Source.FileName is set to the correct path and file name.
This property is also used to inspect the current state of the device. If the current value of this property is True and the etPlay.Device.Pause property is false then the audio device is currently allocated to this instance of etRecord and recording. If the value is False then the this instance of etPlay is not currently playing although another object or application may have the audio device allocated.
The etPlay.Device.Active and etPlay.Device.Pause property may be used in conjunction to load a wave file into memory without allocating the audio device. This is useful for applications that need to play large wave files that may take an long time to load into memory. To take advantage of this feature set the etPlay.Device.Pause property to True then set etPlay.Device.Active to True. This causes the wave file to be loaded into the memory and the etPlay.OnLoaded event to be fired (at this time the audio device is not allocated). When the application is ready to play the file, set the etPlay.Device.Pause property to False.
ActiveX: etPlay.DeviceCODECsEnabled
Type: Boolean
When: Design-Time
Read/Write: Read and Write
Edition: Standard, Professional, Enterprise
ActiveX: etPlay.DeviceCount
Type: Integer
When: Design-Time and Run-Time
Read/Write: Read Only
Edition: Standard, Professional, Enterprise
This is the number of wave play audio devices available through the multimedia functions of the Windows
operating system.
ActiveX: etPlay.DeviceDelay
Type: Integer
When: Design-Time and Run-Time
Read/Write: Read and Write
Edition: Standard, Professional, Enterprise
The etPlay.Device.Delay property is used to cause a delay after the audio device indicates that it
is finished with data buffer. With most devices this indicates that the device is finished playing the
wave file. Some devices are not quite finished cleaning up and require a delay prior to releasing the
device. The etPlay.Device.Delay property allows you to add a delay giving the device time to catch up.
This is most commonly required for voice modems when they are working with larger wave files. In some
cases, you must delay an entire second (set etPlay.Device.Delay to 1000 milliseconds) although in most
cases only a quarter (250 milliseconds) to a half second (500 milliseconds) is required. More sophisticated
telephony devices do not require a delay and the etPlay.Device.Delay property may be set to 0.
ActiveX: etPlay.DeviceID
Type: Integer
When: Design-Time and Run-Time
Read/Write: Read and Write
Edition: Standard, Professional, Enterprise
<Click
here for example>
Set this property to indicate which windows wave play audio device is to be used. Legal values for this property are 0 to Device.Count -1. The Device.Name property holds the name.
To play a wave file over the TAPI Line or TAPI Phone device, you must use the correct audio device. See the etPlay Overview for details.
ActiveX: etPlay.DeviceList
Type: TStrings
When: Design-Time and Run-Time
Read/Write: Read Only
Edition: Standard, Professional, Enterprise
This is a list of the available wave play audio devices according to the Windows operating system.
There are (Device.Count - 1) devices listed in the order of their ID value. The first device in the list
has an ID of 0, the last device has an ID of (Device.Count -1).
ActiveX: etPlay.DeviceLoop
Type: Boolean
When: Design-Time and Run-Time
Read/Write: Read and Write
Edition: Standard, Professional, Enterprise
<Click
here for example>
This property is used to cause the wave file to be played again and again as long as this property is True and the etPlay.Device.Active property remains True.
When this property is set to true and the wave audio device signals that it is completed playing the wave file, the etPlay.OnLoop event fires. The wave file resumes playing immediately. The wave data is not freed, so etPlay does not reread data from the disk repeatedly.
This feature does not utilize the Windows Waveform looping feature because it is limited by the number of times the wave data can be looped, and not all wave play audio devices support the Windows-based feature.
Note: Dialogic cards do not support this feature.
ActiveX: etPlay.DeviceName
Type: String
When: Design-Time and Run-Time
Read/Write: Read and Write
Edition: Standard, Professional, Enterprise
<Click
here for example>
This is the name of the device identified in the Device.ID property. This property can also be set to the exact name of the wave audio device. If an exact match is found the the Device.ID is updated.
This is useful for your application configuration bacause the name of the device is less likely to change than the device ID. The device ID is assigned by the Windows operating system and may change if other devices are added or deleted. For example, save the Device.Name property when exiting your application. When starting your application retrieve the stored name and set this property.
ActiveX: etPlay.DevicePause
Type: Boolean
When: Design-Time and Run-Time
Read/Write: Read and Write
Edition: Professional, Enterprise
The etPlay.Device.Pause can be used to help eliminate the delay. Prior to needing the wave file your
application can load the file or files into memory. This is done by setting the etPlay.Device.Pause property
to True prior to setting etPlay.Device.Active to True. When etPlay.Device.Active is then set to True all
of the files are loaded into memory, the etPlay.OnLoaded event fires and etPlay is paused before it begins
to play. At this point the audio device is not being used. Set the etPlay.Device.Pause property to false
when your application is ready to play the wave file(s) at which time the buffer is passed to the audio
device and playing begins.
If the etPlay.Device.Pause property is set to True while etPlay.Device.Active is True then the audio device will still be in use. If another control, process or application attempts to use the audio device then it will receive the error MMSYSERR_ALLOCATED.
ActiveX: etPlay.DeviceTimeout
Type: Integer
When: Design-Time and Run-Time
Read/Write: Read and Write
Edition: Standard, Professional, Enterprise
Many audio functions work in an asynchronous fashion meaning that the when a function is called it
returns immediately although the operation will not be complete until a reply message is sent to the application.
TeleTools insulates you from these types of functions by stalling your code execution until the message
is returned. This time period is most often just a few milliseconds so you will not notice that it is
happening. In case of an error we have added a timeout feature that will ensure that TeleTools does not
hang your application in the case that the reply message is not returned.
The value for this property is in milliseconds. The default value is 4000 (4 seconds).
ActiveX: etPlay.DeviceWait
Type: Boolean
When: Design-Time and Run-Time
Read/Write: Read and Write
Edition: Standard, Professional, Enterprise
This property indicates to etPlay that it should wait for the file to finish playing before returning
control to the application. Setting this to True is useful if your application requires a wave file to
finish playing before moving on to the next line of code. The default value of this property is false
which allows your application to continue to execute while the wave file is playing.
Note: ExceleTel does not recommend using this feature for applications that support more than one line device or need to play wave files regularly or use large wave files. It is better to use the etPlay.OnDone event which indicates when the wave file is finished playing.
See Recommended Reading | Event Driven.