Update of /cvsroot/alsa/alsa-lib/src/pcm
In directory sc8-pr-cvs1:/tmp/cvs-serv19176/src/pcm
Modified Files:
Makefile.am pcm.c pcm_symbols.c
Removed Files:
pcm_jack.c
Log Message:
Moved pcm_jack plugin to src/pcm/ext directory (must be build manually).
The pcm open functions looks to /usr/lib/alsa-lib directory for plugins
like jack.
Index: Makefile.am
===================================================================
RCS file: /cvsroot/alsa/alsa-lib/src/pcm/Makefile.am,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- Makefile.am 5 Mar 2003 12:24:52 -0000 1.45
+++ Makefile.am 5 Mar 2003 19:56:56 -0000 1.46
@@ -1,10 +1,6 @@
-EXTRA_LTLIBRARIES = libpcm.la
+SUBDIRS = ext
-if HAVE_JACK
-JACK_PLUGIN = pcm_jack.c
-else
-JACK_PLUGIN =
-endif
+EXTRA_LTLIBRARIES = libpcm.la
libpcm_la_SOURCES = atomic.c mask.c interval.c \
pcm.c pcm_params.c \
@@ -13,12 +9,10 @@
pcm_rate.c pcm_plug.c pcm_misc.c pcm_mmap.c pcm_multi.c \
pcm_shm.c pcm_file.c pcm_null.c pcm_share.c \
pcm_meter.c pcm_hooks.c pcm_lfloat.c pcm_ladspa.c \
- pcm_dmix.c $(JACK_PLUGIN) pcm_symbols.c
+ pcm_dmix.c pcm_symbols.c
noinst_HEADERS = pcm_local.h pcm_plugin.h mask.h mask_inline.h \
interval.h interval_inline.h plugin_ops.h ladspa.h \
pcm_dmix_i386.h
-
-EXTRA_libpcm_la_SOURCES = pcm_jack.c
alsadir = $(datadir)/alsa
Index: pcm.c
===================================================================
RCS file: /cvsroot/alsa/alsa-lib/src/pcm/pcm.c,v
retrieving revision 1.248
retrieving revision 1.249
diff -u -r1.248 -r1.249
--- pcm.c 28 Feb 2003 20:29:47 -0000 1.248
+++ pcm.c 5 Mar 2003 19:56:57 -0000 1.249
@@ -1706,12 +1706,18 @@
return handler->u.pcm;
}
+static char *build_in_pcms[] = {
+ "adpcm", "alaw", "copy", "dmix", "file", "hooks", "hw", "ladspa", "lfloat",
+ "linear", "meter", "mulaw", "multi", "null", "plug", "rate", "route", "share",
+ "shm", NULL
+};
+
static int snd_pcm_open_conf(snd_pcm_t **pcmp, const char *name,
snd_config_t *pcm_root, snd_config_t *pcm_conf,
snd_pcm_stream_t stream, int mode)
{
const char *str;
- char buf[256];
+ char *buf = NULL, *buf1 = NULL;
int err;
snd_config_t *conf, *type_conf = NULL;
snd_config_iterator_t i, next;
@@ -1785,8 +1791,30 @@
}
}
if (!open_name) {
+ buf = malloc(strlen(str) + 32);
+ if (buf == NULL) {
+ err = -ENOMEM;
+ goto _err;
+ }
open_name = buf;
- snprintf(buf, sizeof(buf), "_snd_pcm_%s_open", str);
+ sprintf(buf, "_snd_pcm_%s_open", str);
+ }
+ if (!lib) {
+ char **build_in = build_in_pcms;
+ while (*build_in) {
+ if (!strcmp(*build_in, str))
+ break;
+ build_in++;
+ }
+ if (*build_in == NULL) {
+ buf1 = malloc(strlen(str) + sizeof(PKGLIBDIR) + 32);
+ if (buf1 == NULL) {
+ err = -ENOMEM;
+ goto _err;
+ }
+ lib = buf1;
+ sprintf(buf1, "%s/libasound_module_pcm_%s.so", PKGLIBDIR, str);
+ }
}
#ifndef PIC
snd_pcm_open_symbols(); /* this call is for static linking only */
@@ -1810,11 +1838,15 @@
err = open_func(pcmp, name, pcm_root, pcm_conf, stream, mode);
if (err >= 0) {
(*pcmp)->dl_handle = h;
- return 0;
+ err = 0;
} else {
snd_dlclose(h);
}
}
+ if (buf)
+ free(buf);
+ if (buf1)
+ free(buf1);
return err;
}
Index: pcm_symbols.c
===================================================================
RCS file: /cvsroot/alsa/alsa-lib/src/pcm/pcm_symbols.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- pcm_symbols.c 17 Feb 2003 14:34:41 -0000 1.7
+++ pcm_symbols.c 5 Mar 2003 19:56:58 -0000 1.8
@@ -41,9 +41,6 @@
extern const char *_snd_module_pcm_lfloat;
extern const char *_snd_module_pcm_ladspa;
extern const char *_snd_module_pcm_dmix;
-#ifdef HAVE_JACK
-extern const char *_snd_module_pcm_jack;
-#endif
static const char **snd_pcm_open_objects[] = {
&_snd_module_pcm_adpcm,
@@ -64,10 +61,7 @@
&_snd_module_pcm_shm,
&_snd_module_pcm_lfloat,
&_snd_module_pcm_ladspa,
- &_snd_module_pcm_dmix,
-#ifdef HAVE_JACK
- &_snd_module_pcm_jack
-#endif
+ &_snd_module_pcm_dmix
};
void *snd_pcm_open_symbols(void)
--- pcm_jack.c DELETED ---
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger
for complex code. Debugging C/C++ programs can leave you feeling lost and
disoriented. TotalView can help you find your way. Available on major UNIX
and Linux platforms. Try it free. www.etnus.com
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog