/* 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_port_h__ #define __jack_port_h__ #include #include typedef struct _jack_port_type_info { const char *type_name; /* what do you think ? */ void (*mixdown)(jack_port_t *, nframes_t); /* function to mixdown multiple inputs to a buffer. can be NULL, indicating that multiple input connections are not legal for this data type. */ long buffer_scale_factor; /* If == 1, then a buffer to handle nframes worth of data is sizeof(sample_t) * nframes bytes large. If anything other than 1, the buffer allocated for input mixing will be this value times sizeof (sample_t) * nframes bytes in size. Obviously, for non-audio data types, it may have a different value. if < 0, then the value should be ignored, and port->shared->buffer_size should be used. */ } jack_port_type_info_t; /* This is the data structure allocated in shared memory by the engine. */ typedef struct _jack_port_shared { void *buffer; unsigned long flags; unsigned long buffer_size; jack_port_id_t id; char name[JACK_CLIENT_NAME_SIZE+JACK_PORT_NAME_SIZE+2]; jack_port_type_info_t type_info; jack_client_id_t client_id; char in_use : 1; char locked : 1; } jack_port_shared_t; /* This is the data structure allocated by the client in local memory. The `shared' pointer points the the corresponding structure in shared memory. */ struct _jack_port { struct _jack_port_shared *shared; GSList *connections; struct _jack_port *tied; void *own_buffer; }; /* this is the structure allocated by the engine in local memory. */ typedef struct _jack_port_internal { struct _jack_port_shared *shared; GSList *connections; } jack_port_internal_t; #endif /* __jack_port_h__ */