sndfile2k
1.2.0
|
Enumerations | |
enum | SF_ERR { SF_ERR_NO_ERROR = 0, SF_ERR_UNRECOGNISED_FORMAT = 1, SF_ERR_SYSTEM = 2, SF_ERR_MALFORMED_FILE = 3, SF_ERR_UNSUPPORTED_ENCODING = 4 } |
Defines public error values. More... | |
Functions | |
SNDFILE2K_EXPORT int | sf_error (SNDFILE *sndfile) |
Returns the current error code for the given SNDFILE. More... | |
SNDFILE2K_EXPORT const char * | sf_strerror (SNDFILE *sndfile) |
Returns textual description of the current error code for the given SNDFILE. More... | |
SNDFILE2K_EXPORT const char * | sf_error_number (int errnum) |
Returns text description of error code. More... | |
SNDFILE2K_EXPORT int | sf_perror (SNDFILE *sndfile) |
Returns internal error code for the given SNDFILE. More... | |
SNDFILE2K_EXPORT int | sf_error_str (SNDFILE *sndfile, char *str, size_t len) |
Fills provided buffer with text description of error code for the given SNDFILE. More... | |
enum SF_ERR |
Defines public error values.
These are guaranteed to remain unchanged for the duration of the library major version number.
There are also a large number of private error numbers which are internal to the library which can change at any time.
SNDFILE2K_EXPORT int sf_error | ( | SNDFILE * | sndfile | ) |
Returns the current error code for the given SNDFILE.
[in] | sndfile | Pointer to a sound file state |
The error code may be one of SF_ERR values, or any one of many other internal error values.
Applications should only test the return value against SF_ERR values as the internal error values are subject to change at any time.
For errors not in the above list, the function sf_error_number() can be used to convert it to an error string.
SNDFILE2K_EXPORT const char* sf_error_number | ( | int | errnum | ) |
Returns text description of error code.
[in] | errnum | Error code |
SNDFILE2K_EXPORT int sf_error_str | ( | SNDFILE * | sndfile, |
char * | str, | ||
size_t | len | ||
) |
Fills provided buffer with text description of error code for the given SNDFILE.
[in] | sndfile | Pointer to a sound file state |
[out] | str | Pointer to an allocated string buffer |
[in] | len | Size in bytes of str |
The error code may be one of SF_ERR values, or any one of many other internal error values.
SNDFILE2K_EXPORT int sf_perror | ( | SNDFILE * | sndfile | ) |
Returns internal error code for the given SNDFILE.
[in] | sndfile | Pointer to a sound file state |
The error code may be one of SF_ERR values, or any one of many other internal error values.
\sa sf_error_str()
SNDFILE2K_EXPORT const char* sf_strerror | ( | SNDFILE * | sndfile | ) |
Returns textual description of the current error code for the given SNDFILE.
[in] | sndfile | Pointer to a sound file state |