Defines | |
#define | __SND_DLSYM_VERSION(name, version) |
Helper macro for SND_DLSYM_BUILD_VERSION. | |
#define | SND_DLSYM_BUILD_VERSION(name, version) |
Appends the build version to the name of a versioned dynamic symbol. | |
#define | __STRING(x) #x |
Return 'x' argument as string. | |
#define | SND_DLSYM_VERSION(version) __STRING(version) |
Returns the version of a dynamic symbol as a string. | |
#define | __snd_alloca(ptr, type) do { *ptr = (type##_t *) alloca(type##_sizeof()); memset(*ptr, 0, type##_sizeof()); } while (0) |
alloca helper macro. | |
Typedefs | |
typedef struct _snd_async_handler | snd_async_handler_t |
Internal structure for an async notification client handler. | |
typedef void(* | snd_async_callback_t )(snd_async_handler_t *handler) |
Async notification callback. | |
typedef struct timeval | snd_timestamp_t |
typedef struct timespec | snd_htimestamp_t |
Functions | |
const char * | snd_asoundlib_version (void) |
Returns the ALSA sound library version in ASCII format. | |
void * | snd_dlopen (const char *file, int mode) |
Opens a dynamic library - ALSA wrapper for dlopen . | |
void * | snd_dlsym (void *handle, const char *name, const char *version) |
Resolves a symbol from a dynamic library - ALSA wrapper for dlsym . | |
int | snd_dlclose (void *handle) |
Closes a dynamic library - ALSA wrapper for dlclose . | |
int | snd_async_add_handler (snd_async_handler_t **handler, int fd, snd_async_callback_t callback, void *private_data) |
Registers an async handler. | |
int | snd_async_del_handler (snd_async_handler_t *handler) |
Deletes an async handler. | |
int | snd_async_handler_get_fd (snd_async_handler_t *handler) |
Returns the file descriptor assigned to an async handler. | |
int | snd_async_handler_get_signo (snd_async_handler_t *handler) |
Returns the signal number assigned to an async handler. | |
void * | snd_async_handler_get_callback_private (snd_async_handler_t *handler) |
Returns the private data assigned to an async handler. | |
struct snd_shm_area * | snd_shm_area_create (int shmid, void *ptr) |
Create a shm area record. | |
struct snd_shm_area * | snd_shm_area_share (struct snd_shm_area *area) |
Increase the reference counter of shm area record. | |
int | snd_shm_area_destroy (struct snd_shm_area *area) |
Release the shared area record. | |
int | snd_user_file (const char *file, char **result) |
Get the full file name. |
Global defines and functions.
typedef void(* snd_async_callback_t)(snd_async_handler_t *handler) |
Async notification callback.
See the snd_async_add_handler function for details.
typedef struct _snd_async_handler snd_async_handler_t |
Internal structure for an async notification client handler.
The ALSA library uses a pointer to this structure as a handle to an async notification object. Applications don't access its contents directly.
typedef struct timespec snd_htimestamp_t |
Hi-res timestamp
typedef struct timeval snd_timestamp_t |
Timestamp
const char* snd_asoundlib_version | ( | void | ) |
Returns the ALSA sound library version in ASCII format.
int snd_async_add_handler | ( | snd_async_handler_t ** | handler, | |
int | fd, | |||
snd_async_callback_t | callback, | |||
void * | private_data | |||
) |
Registers an async handler.
handler | The function puts the pointer to the new async handler object at the address specified by handler .
SIGIO signal may have been replaced with another signal, see snd_async_handler_get_signo. |
int snd_async_del_handler | ( | snd_async_handler_t * | handler | ) |
Deletes an async handler.
handler | Handle of the async handler to delete.
|
void* snd_async_handler_get_callback_private | ( | snd_async_handler_t * | handler | ) |
Returns the private data assigned to an async handler.
handler | Handle to an async handler.
|
int snd_async_handler_get_fd | ( | snd_async_handler_t * | handler | ) |
Returns the file descriptor assigned to an async handler.
handler | Handle to an async handler.
|
int snd_async_handler_get_signo | ( | snd_async_handler_t * | handler | ) |
Returns the signal number assigned to an async handler.
handler | Handle to an async handler.
SIGIO , but wizards can redefine it to a realtime signal when compiling the ALSA library. |
int snd_dlclose | ( | void * | handle | ) |
Closes a dynamic library - ALSA wrapper for dlclose
.
handle | Library handle, similar to dlclose .
|
void* snd_dlopen | ( | const char * | name, | |
int | mode | |||
) |
Opens a dynamic library - ALSA wrapper for dlopen
.
name | name of the library, similar to dlopen .
|
void* snd_dlsym | ( | void * | handle, | |
const char * | name, | |||
const char * | version | |||
) |
Resolves a symbol from a dynamic library - ALSA wrapper for dlsym
.
handle | Library handle, similar to dlsym .
dlsym function checks also the version of the symbol. A versioned symbol should be defined using the SND_DLSYM_BUILD_VERSION macro. |
struct snd_shm_area* snd_shm_area_create | ( | int | shmid, | |
void * | ptr | |||
) | [read] |
Create a shm area record.
shmid | IPC SHM ID
|
int snd_shm_area_destroy | ( | struct snd_shm_area * | area | ) |
Release the shared area record.
area | the shared are record
|
struct snd_shm_area* snd_shm_area_share | ( | struct snd_shm_area * | area | ) | [read] |
Increase the reference counter of shm area record.
area | shm area record
|
int snd_user_file | ( | const char * | file, | |
char ** | result | |||
) |
Get the full file name.
file | The file name string to parse
|