Update of /cvsroot/alsa/alsa-oss/oss-redir In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12436
Added Files: README Log Message: Initial --- NEW FILE: README --- Open Sound System call redirector ================================= The purpose of this little piece of code is to redirect OSS (Open Sound System) calls to any shared library to avoid overhead caused with the LD_PRELOAD wrapper. Especially, wrapping select() and poll() functions cause big overhead. In ideal world, all OSS programs will use this little code to allow a sound emulation for OSS based APIs without requirement of ugly LD_PRELOAD hacks. Usage ===== Set environment variable OSS_REDIRECTOR to name of dynamic library with lib_oss_* public functions. For example (ALSA): export OSS_REDIRECTOR=libalsatoss.so If this variable is not set, or this value is "oss" or "OSS", the direct system calls are used. Porting OSS application to use this code ======================================== All functions have equivalent as using syscalls. Only one exception is select() or poll() usage. It is required to use oss_pcm_select*() or oss_pcm_poll*() wrappers to determine the "real" used file descriptors and mangle back the result. Note that the *prepare() functions returns the count of file descriptors allocated (poll) or the maximum used file descriptor (select). Porting example =============== FIXME: Add a link to a good patch. ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog