Handling Errors with Audio Functions

The waveform audio functions return a nonzero value when an error occurs. Windows CE provides functions that convert these error values into textual descriptions of the errors. The application must still examine the error values to determine how to proceed, but it can use a textual description in a dialog box to describe an error to the user. The following table shows the functions used to retrieve textual descriptions of audio error values.

Function
Description
waveInGetErrorText Retrieves a textual description of a specified waveform audio input error
waveOutGetErrorText Retrieves a textual description of a specified waveform audio output error

The only audio functions that do not return error values are waveInGetNumDevs and waveOutGetNumDevs. These functions return 0 if no devices are present in a system or if they encounter any errors.