git-svn-id: svn+ssh://jackaudio.org/trunk/jack@11 0c269be4-1314-0410-8aa9-9f06e86f4224tags/0.109.0
| @@ -14,7 +14,7 @@ EXTRA_CFLAGS = -DADDON_DIR=\"$(ADDON_DIR)\" @GLIB_CFLAGS@ | |||
| CFLAGS += $(EXTRA_CFLAGS) | |||
| jackd_SOURCES = jackd.c | |||
| jackd_SOURCES = jackd.c engine.c driver.c | |||
| jackd_LDFLAGS = -L. -ljack -lltdl -lpthread | |||
| jack_simple_client_SOURCES = simple_client.c | |||
| @@ -28,7 +28,7 @@ jack_fltk_client_LDFLAGS = -L. -L/usr/X11R6/lib -lfltk -lX11 -lXext -ljack -lltd | |||
| lib_LTLIBRARIES = libjack.la jack_alsa.la | |||
| libjack_la_SOURCES = engine.c client.c pool.c driver.c | |||
| libjack_la_SOURCES = client.c pool.c | |||
| jack_alsa_la_LDFLAGS = -module | |||
| jack_alsa_la_SOURCES = alsa_driver.c hammerfall.c generic_hw.c memops.c | |||
| @@ -2,19 +2,19 @@ | |||
| Copyright (C) 2001 Paul Davis | |||
| This program is free software; you can redistribute it and/or modify | |||
| it under the terms of the GNU General Public License as published by | |||
| the Free Software Foundation; either version 2 of the License, or | |||
| it under the terms of the GNU Lesser General Public License as published by | |||
| the Free Software Foundation; either version 2.1 of the License, or | |||
| (at your option) any later version. | |||
| This program is distributed in the hope that it will be useful, | |||
| but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
| GNU General Public License for more details. | |||
| You should have received a copy of the GNU General Public License | |||
| along with this program; if not, write to the Free Software | |||
| Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |||
| GNU Lesser General Public License for more details. | |||
| You should have received a copy of the GNU Lesser General Public License | |||
| along with this program; if not, write to the Free Software | |||
| Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |||
| $Id$ | |||
| */ | |||
| @@ -27,6 +27,7 @@ | |||
| #include <sys/ipc.h> | |||
| #include <sys/shm.h> | |||
| #include <sys/poll.h> | |||
| #include <stdarg.h> | |||
| #include <stdio.h> | |||
| #include <asm/msr.h> | |||
| @@ -34,6 +35,7 @@ | |||
| #include <jack/internal.h> | |||
| #include <jack/engine.h> | |||
| #include <jack/pool.h> | |||
| #include <jack/error.h> | |||
| static pthread_mutex_t client_lock; | |||
| static pthread_cond_t client_ready; | |||
| @@ -64,6 +66,20 @@ typedef struct { | |||
| const char *client_name; | |||
| } client_info; | |||
| static void | |||
| default_jack_error (const char *fmt, ...) | |||
| { | |||
| va_list ap; | |||
| va_start (ap, fmt); | |||
| vfprintf (stderr, fmt, ap); | |||
| va_end (ap); | |||
| fputc ('\n', stderr); | |||
| } | |||
| void (*jack_error)(const char *fmt, ...) = &default_jack_error; | |||
| jack_client_t * | |||
| jack_client_alloc () | |||
| @@ -134,20 +134,6 @@ jack_client_is_inprocess (jack_client_internal_t *client) | |||
| return (client->control->type == ClientDynamic) || (client->control->type == ClientDriver); | |||
| } | |||
| static void | |||
| default_jack_error (const char *fmt, ...) | |||
| { | |||
| va_list ap; | |||
| va_start (ap, fmt); | |||
| vfprintf (stderr, fmt, ap); | |||
| va_end (ap); | |||
| fputc ('\n', stderr); | |||
| } | |||
| void (*jack_error)(const char *fmt, ...) = &default_jack_error; | |||
| static | |||
| void shm_destroy (int status, void *arg) | |||
| @@ -1,3 +1,23 @@ | |||
| /* | |||
| Copyright (C) 2001 Paul Davis | |||
| This program is free software; you can redistribute it and/or modify | |||
| it under the terms of the GNU Lesser General Public License as published by | |||
| the Free Software Foundation; either version 2.1 of the License, or | |||
| (at your option) any later version. | |||
| This program is distributed in the hope that it will be useful, | |||
| but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
| GNU Lesser General Public License for more details. | |||
| You should have received a copy of the GNU Lesser General Public License | |||
| along with this program; if not, write to the Free Software | |||
| Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |||
| $Id$ | |||
| */ | |||
| #ifndef __jack_error_h__ | |||
| #define __jack_error_h__ | |||
| @@ -1,3 +1,23 @@ | |||
| /* | |||
| Copyright (C) 2001 Paul Davis | |||
| This program is free software; you can redistribute it and/or modify | |||
| it under the terms of the GNU General Public License as published by | |||
| the Free Software Foundation; either version 2 of the License, or | |||
| (at your option) any later version. | |||
| This program is distributed in the hope that it will be useful, | |||
| but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
| GNU General Public License for more details. | |||
| You should have received a copy of the GNU General Public License | |||
| along with this program; if not, write to the Free Software | |||
| Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |||
| $Id$ | |||
| */ | |||
| #ifndef __jack_generic_h__ | |||
| #define __jack_generic_h__ | |||
| @@ -1,3 +1,23 @@ | |||
| /* | |||
| Copyright (C) 2001 Paul Davis | |||
| This program is free software; you can redistribute it and/or modify | |||
| it under the terms of the GNU General Public License as published by | |||
| the Free Software Foundation; either version 2 of the License, or | |||
| (at your option) any later version. | |||
| This program is distributed in the hope that it will be useful, | |||
| but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
| GNU General Public License for more details. | |||
| You should have received a copy of the GNU General Public License | |||
| along with this program; if not, write to the Free Software | |||
| Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |||
| $Id$ | |||
| */ | |||
| #ifndef __jack_hammerfall_h__ | |||
| #define __jack_hammerfall_h__ | |||
| @@ -1,3 +1,23 @@ | |||
| /* | |||
| Copyright (C) 2001 Paul Davis | |||
| This program is free software; you can redistribute it and/or modify | |||
| it under the terms of the GNU General Public License as published by | |||
| the Free Software Foundation; either version 2 of the License, or | |||
| (at your option) any later version. | |||
| This program is distributed in the hope that it will be useful, | |||
| but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
| GNU General Public License for more details. | |||
| You should have received a copy of the GNU General Public License | |||
| along with this program; if not, write to the Free Software | |||
| Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |||
| $Id$ | |||
| */ | |||
| #ifndef __jack_hardware_h__ | |||
| #define __jack_hardware_h__ | |||
| @@ -1,20 +1,19 @@ | |||
| /* | |||
| Copyright (C) 2001 Paul Davis | |||
| This program is free software; you can redistribute it and/or modify | |||
| it under the terms of the GNU General Public License as published by | |||
| the Free Software Foundation; either version 2 of the License, or | |||
| it under the terms of the GNU Lesser General Public License as published by | |||
| the Free Software Foundation; either version 2.1 of the License, or | |||
| (at your option) any later version. | |||
| This program is distributed in the hope that it will be useful, | |||
| but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
| GNU General Public License for more details. | |||
| You should have received a copy of the GNU General Public License | |||
| along with this program; if not, write to the Free Software | |||
| Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |||
| GNU Lesser General Public License for more details. | |||
| You should have received a copy of the GNU Lesser General Public License | |||
| along with this program; if not, write to the Free Software | |||
| Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |||
| $Id$ | |||
| */ | |||
| @@ -1,19 +1,19 @@ | |||
| /* | |||
| Copyright (C) 2001 Paul Davis | |||
| x | |||
| This program is free software; you can redistribute it and/or modify | |||
| it under the terms of the GNU General Public License as published by | |||
| the Free Software Foundation; either version 2 of the License, or | |||
| it under the terms of the GNU Lesser General Public License as published by | |||
| the Free Software Foundation; either version 2.1 of the License, or | |||
| (at your option) any later version. | |||
| This program is distributed in the hope that it will be useful, | |||
| but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
| GNU General Public License for more details. | |||
| You should have received a copy of the GNU General Public License | |||
| along with this program; if not, write to the Free Software | |||
| Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |||
| GNU Lesser General Public License for more details. | |||
| You should have received a copy of the GNU Lesser General Public License | |||
| along with this program; if not, write to the Free Software | |||
| Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |||
| $Id$ | |||
| */ | |||
| @@ -2,18 +2,18 @@ | |||
| Copyright (C) 2001 Paul Davis | |||
| This program is free software; you can redistribute it and/or modify | |||
| it under the terms of the GNU General Public License as published by | |||
| the Free Software Foundation; either version 2 of the License, or | |||
| it under the terms of the GNU Lesser General Public License as published by | |||
| the Free Software Foundation; either version 2.1 of the License, or | |||
| (at your option) any later version. | |||
| This program is distributed in the hope that it will be useful, | |||
| but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
| GNU General Public License for more details. | |||
| You should have received a copy of the GNU General Public License | |||
| along with this program; if not, write to the Free Software | |||
| Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |||
| GNU Lesser General Public License for more details. | |||
| You should have received a copy of the GNU Lesser General Public License | |||
| along with this program; if not, write to the Free Software | |||
| Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |||
| $Id$ | |||
| */ | |||
| @@ -2,18 +2,18 @@ | |||
| Copyright (C) 2001 Paul Davis | |||
| This program is free software; you can redistribute it and/or modify | |||
| it under the terms of the GNU General Public License as published by | |||
| the Free Software Foundation; either version 2 of the License, or | |||
| it under the terms of the GNU Lesser General Public License as published by | |||
| the Free Software Foundation; either version 2.1 of the License, or | |||
| (at your option) any later version. | |||
| This program is distributed in the hope that it will be useful, | |||
| but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
| GNU General Public License for more details. | |||
| You should have received a copy of the GNU General Public License | |||
| along with this program; if not, write to the Free Software | |||
| Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |||
| GNU Lesser General Public License for more details. | |||
| You should have received a copy of the GNU Lesser General Public License | |||
| along with this program; if not, write to the Free Software | |||
| Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |||
| $Id$ | |||
| */ | |||
| @@ -2,19 +2,19 @@ | |||
| Copyright (C) 2001 Paul Davis | |||
| This program is free software; you can redistribute it and/or modify | |||
| it under the terms of the GNU General Public License as published by | |||
| the Free Software Foundation; either version 2 of the License, or | |||
| it under the terms of the GNU Lesser General Public License as published by | |||
| the Free Software Foundation; either version 2.1 of the License, or | |||
| (at your option) any later version. | |||
| This program is distributed in the hope that it will be useful, | |||
| but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
| GNU General Public License for more details. | |||
| You should have received a copy of the GNU General Public License | |||
| along with this program; if not, write to the Free Software | |||
| Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |||
| GNU Lesser General Public License for more details. | |||
| You should have received a copy of the GNU Lesser General Public License | |||
| along with this program; if not, write to the Free Software | |||
| Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |||
| $Id$ | |||
| */ | |||
| @@ -1,51 +0,0 @@ | |||
| /* | |||
| Copyright (C) 2001 Paul Davis | |||
| This program is free software; you can redistribute it and/or modify | |||
| it under the terms of the GNU General Public License as published by | |||
| the Free Software Foundation; either version 2 of the License, or | |||
| (at your option) any later version. | |||
| This program is distributed in the hope that it will be useful, | |||
| but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
| GNU General Public License for more details. | |||
| You should have received a copy of the GNU General Public License | |||
| along with this program; if not, write to the Free Software | |||
| Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |||
| $Id$ | |||
| */ | |||
| #ifndef __audioengine_port_h__ | |||
| #endif __audioengine_port_h__ | |||
| #define AUDIOENGINE_PORT_NAME_SIZE 32 | |||
| #define AUDIOENGINE_PORT_TYPE_SIZE 32 | |||
| struct _audioengine_port_t { | |||
| /* clients can use this value, and only this value */ | |||
| void *buffer; | |||
| /* the rest of this is private, for use by the engine only */ | |||
| unsigned long flags; | |||
| GSList *connections; | |||
| void *own_buffer; | |||
| audioengine_port_t *tied; | |||
| unsigned long buffer_size; | |||
| char name[AUDIOENGINE_PORT_NAME_SIZE+1]; | |||
| char type[AUDIOENGINE_PORT_TYPE_SIZE+1]; | |||
| char client[AUDIOENGINE_CLIENT_NAME_SIZE+1]; | |||
| pthread_mutex_t lock; | |||
| audioengine_port_id_t id; | |||
| unsigned long client_id; | |||
| char in_use : 1; | |||
| char builtin : 1; | |||
| char locked : 1; | |||
| }; | |||
| #endif /* __audioengine_port_h__ */ | |||