The VoipMediaEngine..::.WaveFile type exposes the following members.

Methods

  NameDescription
CloseWaveFile
The CloseWaveFile API procedure is used to close a previously opened wave file.
Finalize
The Object's finalizer.
(Overrides Object..::.Finalize()()().)
GetWaveBuffer
The GetWaveBuffer API procedure is used to retrieve a "sample block" data buffer from an open wave file. Applications should continue to read data from a wave file until this procedure returns a zero (FALSE) value. A zero return value indicates that all data has been read from the wave file image.
Note:
The final sample data block read from the wave file may be padded with "silence" data at the end. This is required because sample data from a wave file will very rarely be an integer number of "wave buffer bytes" in length.
OpenWaveFile
The OpenWaveFile API procedure is used to open an audio file using the wave format. Once a wave file is opened, applications can read sample data blocks of a specified size from the file without having to know anything about wave file formats.

By using the Media Engine's wave file functions, you will be able to greatly reduce the complexity of your applications. The wave file API procedures can be used by any application however they are extremely useful to IRV, auto attendant or answering machine based applications where streaming audio prompt data from wave files to phone lines is required.

The OpenWaveFile API procedure can open any Windows supported wave file regardless of its rate and format. However, its usefulness is geared towards an application's ability to stream wave file sample data to Tx IVR phone line outputs or to the media engine local audio outputs. Normally source wave file data that is opened and read by the media engine using the OpenWaveFile and GetWaveBuffer(array<Object>[]()[]) procedures should generally be in aLaw, uLaw or in a PCM format that is supported by the media engine's Tx IVR phone line outputs or the media engine local audio outputs.

Before your application terminates, you must call the CloseWaveFile()()() API procedure to regain wave file resources.

SetLoopRead
The SetLoopRead API procedure allows the application to "loop" read sample block data from a source wave file. When enabled, the application will be able to infinitely read sample block data from the source wave file using the GetWaveBuffer(array<Object>[]()[]) API procedure without ever running out of sample block data. This capability is useful when streaming wave file data to phone line transmit IVR channels, in addition to other uses.

See Also