ThbWaveOut
Unit: hbTapiWave

The ThbWaveOut component can be used to play wave files through any available Windows waveform-audio output device including voice modems, specialized telephony hardware and common sound cards.

Voice modems use the UnimodemV Telephony Service Provider (TSP) to interact with TAPI. The UnimodemV TSP is limited to using the wave format "PCM 8000 Hz, 16 Bit, Mono", this is the format used by ThbWaveIn for recording too. Other sophisticated telephony devices support a wider range of wave formats. ThbWaveOut is enabled to play all kinds of formats the device supports.

Playing wave files

To play one or more files through a waveform-audio output device, select the device using the DeviceName and DeviceID properties of ThbWaveOut. Then add the wave files you want to play to the Playlist property. Remember that only one format is allowed at the time. The wave files in playlist will be playes one by one beginning with the first one directly after setting ThbWaveOut.Active to True. Setting ThbWaveOut.Active to False stops the playback.

Using ThbWaveOut along with ThbTapiLine resp. ThbTapiCall

This will allow you to play wave files to be heard over the phone line.

The ThbTapiLine.WaveOut and ThbTapiCall.WaveOut properties are used to associate the components. The ThbTapiLine.WaveOut.Available indicates whether the telephony device has a wave play audio device associated with it. The ThbTapiLine.Active property must first be set to True prior checkingTapiLine.WaveOut.Available. The ThbTapiLine.WaveOut.DeviceID property holds the Windows ID of the waveform-audio output device associated with the TAPI line device.

If a connection is established using ThbTapiLine, the ThbTapiCall.WaveOut.DeviceID property can be used to play wave files over the channel to be heard by the remote party. Set the ThbWaveOut.DeviceID property to the value in the ThbTapiCall.WaveOut.DeviceID to ensure that you are using the correct wave audio device. When using ThbWaveOut and ThbWaveIn along with ThbTapiLine it is importent to remember to stop playing and recording any wave files prior to hanging up a call or when the ThbTapiLine.OnDisconnected event is fired.

Using ThbWaveOut along with ThbTapiPhone

This allows you to play a wave file to be heard on the handset, headset or speakerphone.

The ThbTapiPhone.WaveOut properties are used to associate the ThbTapiPhone and ThbWaveOut components. The ThbTapiPhone.WaveOut.Available property indicates whether the TAPI phone device has a waveform-audio output device associated with it. The ThbTapiPhone.WaveOut.DeviceID holds the Windows ID of the wave play device associated with the TAPI phone device. Set the ThbWaveOut.DeviceID property to the value in the ThbTapiPhone.WaveOut.DeviceID to ensure that you are using the correct waveform-audio output device.