Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages | Examples

global.h

00001 
00028 #ifndef __ALSA_GLOBAL_H_
00029 #define __ALSA_GLOBAL_H_
00030 
00031 #ifdef __cplusplus
00032 extern "C" {
00033 #endif
00034 
00044 const char *snd_asoundlib_version(void);
00045 
00046 #ifndef ATTRIBUTE_UNUSED
00047 
00048 #define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
00049 #endif
00050 
00051 #ifdef PIC /* dynamic build */
00052 
00054 #define __SND_DLSYM_VERSION(name, version) _ ## name ## version
00055 
00059 #define SND_DLSYM_BUILD_VERSION(name, version) char __SND_DLSYM_VERSION(name, version);
00060 
00061 #else /* static build */
00062 
00063 struct snd_dlsym_link {
00064         struct snd_dlsym_link *next;
00065         const char *dlsym_name;
00066         const void *dlsym_ptr;
00067 };
00068 
00069 extern struct snd_dlsym_link *snd_dlsym_start;
00070 
00072 #define __SND_DLSYM_VERSION(prefix, name, version) _ ## prefix ## name ## version
00073 
00077 #define SND_DLSYM_BUILD_VERSION(name, version) \
00078   static struct snd_dlsym_link __SND_DLSYM_VERSION(snd_dlsym_, name, version); \
00079   void __SND_DLSYM_VERSION(snd_dlsym_constructor_, name, version) (void) __attribute__ ((constructor)); \
00080   void __SND_DLSYM_VERSION(snd_dlsym_constructor_, name, version) (void) { \
00081     __SND_DLSYM_VERSION(snd_dlsym_, name, version).next = snd_dlsym_start; \
00082     __SND_DLSYM_VERSION(snd_dlsym_, name, version).dlsym_name = # name; \
00083     __SND_DLSYM_VERSION(snd_dlsym_, name, version).dlsym_ptr = (void *)&name; \
00084     snd_dlsym_start = &__SND_DLSYM_VERSION(snd_dlsym_, name, version); \
00085   }
00086 
00087 #endif
00088 
00089 #ifndef __STRING
00090 
00091 #define __STRING(x)     #x
00092 #endif
00093 
00095 #define SND_DLSYM_VERSION(version) __STRING(version)
00096 
00097 void *snd_dlopen(const char *file, int mode);
00098 void *snd_dlsym(void *handle, const char *name, const char *version);
00099 int snd_dlclose(void *handle);
00100 
00101 
00108 typedef struct _snd_async_handler snd_async_handler_t;
00109 
00115 typedef void (*snd_async_callback_t)(snd_async_handler_t *handler);
00116 
00117 int snd_async_add_handler(snd_async_handler_t **handler, int fd, 
00118                           snd_async_callback_t callback, void *private_data);
00119 int snd_async_del_handler(snd_async_handler_t *handler);
00120 int snd_async_handler_get_fd(snd_async_handler_t *handler);
00121 int snd_async_handler_get_signo(snd_async_handler_t *handler);
00122 void *snd_async_handler_get_callback_private(snd_async_handler_t *handler);
00123 
00124 struct snd_shm_area *snd_shm_area_create(int shmid, void *ptr);
00125 struct snd_shm_area *snd_shm_area_share(struct snd_shm_area *area);
00126 int snd_shm_area_destroy(struct snd_shm_area *area);
00127 
00128 int snd_user_file(const char *file, char **result);
00129 
00131 typedef struct timeval snd_timestamp_t;
00133 typedef struct timespec snd_htimestamp_t;
00134 
00137 #ifdef __cplusplus
00138 }
00139 #endif
00140 
00141 #endif /* __ALSA_GLOBAL_H */

Generated on Mon Jul 4 14:48:32 2005 for ALSA project - the C library reference by  doxygen 1.3.9.1