From 0b8d4c239fd78774c91c3b7da9798f59e8a18be2 Mon Sep 17 00:00:00 2001 From: pbd Date: Tue, 27 Nov 2001 16:37:07 +0000 Subject: [PATCH] don't install all headers; add and use jack_port_name(); remove doc/.xvpics git-svn-id: svn+ssh://jackaudio.org/trunk/jack@43 0c269be4-1314-0410-8aa9-9f06e86f4224 --- alsa_driver.c | 6 ++++++ fltk_client.cc | 4 ++-- jack/Makefile.am | 14 +++++++++++++- jack/jack.h | 4 ++++ simple_client.c | 4 ++-- 5 files changed, 27 insertions(+), 5 deletions(-) diff --git a/alsa_driver.c b/alsa_driver.c index eb69e86..28d19a7 100644 --- a/alsa_driver.c +++ b/alsa_driver.c @@ -227,12 +227,18 @@ alsa_driver_configure_stream (alsa_driver_t *driver, *nchns = snd_pcm_hw_params_get_channels_max (hw_params); if (*nchns > 1024) { + /* the hapless user is an unwitting victim of the "default" ALSA PCM device, which can support up to 16 million channels. since they can't be bothered to set up a proper default device, limit the number of channels for them to a sane default. */ + + jack_error ("You appear to be using the ALSA software \"plug\" layer, probably\n" + "a result of using the \"default\" ALSA device. This is less\n" + "efficient than it could be. Consider using a ~/.asoundrc file\n" + "to define a hardware audio device rather than using the plug layer\n"); *nchns = 2; } diff --git a/fltk_client.cc b/fltk_client.cc index c442f08..3bc7cc4 100644 --- a/fltk_client.cc +++ b/fltk_client.cc @@ -81,11 +81,11 @@ main (int argc, char *argv[]) printf ("client activated\n"); - if (jack_port_connect (client, "ALSA I/O:Input 1", "myinput")) { + if (jack_port_connect (client, "ALSA I/O:Input 1", jack_port_name (my_input_port))) { fprintf (stderr, "cannot connect input ports\n"); } - if (jack_port_connect (client, "myoutput", "ALSA I/O:Output 1")) { + if (jack_port_connect (client, jack_port_name (my_output_port), "ALSA I/O:Output 1")) { fprintf (stderr, "cannot connect output ports\n"); } diff --git a/jack/Makefile.am b/jack/Makefile.am index d2acbbf..2dbefd4 100644 --- a/jack/Makefile.am +++ b/jack/Makefile.am @@ -1,4 +1,16 @@ MAINTAINERCLEANFILES = Makefile.in libjackincludedir = $(includedir)/jack -libjackinclude_HEADERS = $(wildcard *.h) +libjackinclude_HEADERS = jack.h \ + error.h \ + driver.h \ + port.h \ + types.h \ + engine.h + +noinst_HEADERS = alsa_driver.h \ + generic.h \ + hammerfall.h \ + internal.h \ + memops.h \ + pool.h \ No newline at end of file diff --git a/jack/jack.h b/jack/jack.h index 86f0183..5f9490f 100644 --- a/jack/jack.h +++ b/jack/jack.h @@ -217,6 +217,10 @@ jack_port_t **jack_get_ports (jack_client_t *, int jack_engine_takeover_timebase (jack_client_t *); void jack_update_time (jack_client_t *, nframes_t); +/* useful access functions */ + +static __inline__ const char * jack_port_name (jack_port_t *port) { return port->shared->name; } + #ifdef __cplusplus } #endif diff --git a/simple_client.c b/simple_client.c index 223fdb0..c0dffd1 100644 --- a/simple_client.c +++ b/simple_client.c @@ -66,11 +66,11 @@ main (int argc, char *argv[]) printf ("client activated\n"); - if (jack_port_connect (client, "ALSA I/O:Input 1", "myinput")) { + if (jack_port_connect (client, "ALSA I/O:Input 1", jack_port_name (my_input_port))) { fprintf (stderr, "cannot connect input ports\n"); } - if (jack_port_connect (client, "myoutput", "ALSA I/O:Output 1")) { + if (jack_port_connect (client, jack_port_name (my_output_port), "ALSA I/O:Output 1")) { fprintf (stderr, "cannot connect output ports\n"); }