|
|
The etPlay control sends audio data to the audio device via the Windows Audio API. If the device does not support the format of the audio data, Windows will search for a CODEC that has the ability to convert the data from the current format to a supported format. Diagram 1 illustrates the data passing through a CODEC; diagram 2 does not utilize a CODEC. CODECs are specialized drivers that receive streamed audio data in one format and output a stream of audio data in a different format. The use of a CODEC is automatic. The only way to avoid utilizing CODECs is to send the audio data to the device in a format that it supports natively. Most CODECs seem to be work well however we have seen some create problems. For example the header information that is generated by some CODECs is not always compatible with the Dialogic audio drivers; this will cause an error. CODECs execute at the operating system level. This is something to keep in mind if your application supports a large number of lines. For example if you had 48 lines playing wave files simultaneously requiring conversion then 48 copies of the CODEC would need to execute at the same time draining your system’s resources. You will need to check with your telephony hardware supplier for audio formats that your device supports natively to avoid utilizing CODECs. Decoding Wave File Formats with TeleScopeThe TeleScope utility supplied with ExceleTel TeleTools makes it easy to experiment with your telephony device. Use it to learn how your device works and to debug problems with your code and even the telephony device, it’s drivers and Telephony Service Provider (TSP). Please take the time to read the “Using TeleScope” and the “How Do I Do That?” sections of the ExceleTel TeleTools help file. Most telephony devices manufacturers supply sample programs and audio (wave) files with their device and drivers. For example Dialogic has their TAPI sample program (Takler32.exe) and the wave file Play.wav (uLaw 8,000 Hz, 8-bit, Mono). You can use the etPlay TeleScope to view the format information for any wave file. This information can then be used with the etRecord control to record wave files that your telephony device supports.
Figure 1 shows the value of the etPlay.Source.Format properties after the etPlay.Source.FileName has been set. Figure 2 shows that each of the etRecord.Source.Format properties have been set to match those in etPlay. This allows etRecord to create files with the same audio format as the “Play.wav” file. TAPI Browser and Windows Sound RecorderTAPI Browser is a programmer’s utility supplied by Microsoft. Using this you can perform many of the operations available through TeleTools however you need to understand TAPI! Don’t worry; we have come up with the step-by-step instructions you’ll need to perform the Supervised Transfer test. Please reference the “Debugging with TAPI Browser” Topic of the ExceleTel TeleTools help file. TAPI Browse does not have the ability to play and record wave files. For this you will need to use the Windows Sound Recorder in conjunction with the TAPI Browse. To do this you will need to set the “Sound Playback | Preferred device” to use the audio device associated with your telephony device. Selecting the Control Panel applet for “Sound and Multimedia” allows you to do this, see figure 3.
Now you can use TAPI Browser to make or answer a call. Once the call is connected use Windows Sound Recorder to play or record wave files through the audio device.
When you are finished testing remember to reset your audio device! Volume ControlDialogic does not have a configuration setting for the volume level. You need to set the etPlay.Volume properties as follows: etPlay1.Volume.Enabled := True; Converting Wave File FormatsUnfortunately ExceleTel TeleTools does not have the
ability to convert wave file formats at this time. There are a number of
tools available that will allow you to convert your wave files.
For example: Windows Sound Recorder, Cool Edit 200 from Syntrillium
Software Corporation and GoldWave from GoldWave Inc.
NotesThe following settings are the defaults, but you may want to make sure to observe them: Set etPlay.Device.Delay to zero Do not set etPlay.Device.Wait to True Do not set etPlay.Device.Loop to True Voice Modems and wave formatsBecause all Voicemodems use UnimodemV as their TSP, they can only play and record using one wave format, 8kHz, 16-Bit, Mono. Internally, some modem chip sets actually use a non-standard format, sometimes 4-bit. The firmware for the modem therefore must be able to make the conversion. We have seen modems that do not do this correctly, or can play properly but not record. Or, they can play and record fine using a handset, but will not work when using a headset plugged into the speaker and microphone jacks. We recommend checking with your modem manufacturer to get their latest INF file. If you are sure that you want to get into the modem settings yourself, you can check the INF file that came with the modem and make adjustments and then re-install, or if you are daring and don't need to create an install for multiple machines, just change the registry settings. The INF file will contain two sections that look like this. In the first section, the XformID setting must be correct: [VOICE] and here, the correct format must also be set: HKR, LineSetPlayFormat,
1,, "at+vsm=1,8000,0,0<cr>" ;set to
8kHz You can also just search for these keywords in the
registry and find the ones that correspond to your modem. Our
consulting services can help, or you can find more information in the
online Microsoft
MSDN document that explains how INF files work. The settings are
placed in the HKLM\SYSTEM\CurrentControlSet\Class\... section.
Searching for keywords like "LineSetPlayFormat" will find the
CLSID string for your modem and open it's section. These are
numbered 0000, 0001, 0002 etc for each modem in your system. Make
sure you have the correct modem by looking through all the settings.
For example, if you think modem 0001 is yours, click on the 0001 entry and
look to the right. You will see "Friendly Name" and other
registry strings that will identify your modem. Then you can find
each appropriate section and change them accordingly.
|
|
|
||||
|
||||