[Previous] [Contents] [Next]

snd_strerror()

Convert an error code to a string

Synopsis:

#include <sys/asoundlib.h>

const char * snd_strerror( int errnum );

Library:

libasound.so

Description:

The snd_strerror() function converts an error code to a string. Its functionality is the same as the strerror() function from the standard C library however, it also returns the correct strings for sound error codes.

Returns:

A pointer to the error message. Don't modify this string it points to.

Errors:

"Unknown error"
Value for errnum wasn't recognized.

Examples:

See the example in Opening your audio device in the Playing audio data chapter.

Classification:

ALSA

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

[Previous] [Contents] [Next]