Browse Source

mixdown now works; sigsegv causes clean exit from audiothread

git-svn-id: svn+ssh://jackaudio.org/trunk/jack@53 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/0.109.0
pbd 24 years ago
parent
commit
9d63c817e3
4 changed files with 21 additions and 10 deletions
  1. +0
    -1
      client.c
  2. +3
    -2
      engine.c
  3. +7
    -7
      jack/port.h
  4. +11
    -0
      jackd.c

+ 0
- 1
client.c View File

@@ -183,7 +183,6 @@ jack_client_handle_port_connection (jack_client_t *client, jack_event_t *event)
shared = jack_port_shared_by_id (client, event->y.other_id);
control_port = jack_port_by_id (client, event->x.self_id);
control_port->connections = g_slist_prepend (control_port->connections, shared);
printf ("%s connected to %s\n", control_port->shared->name, shared->name);
break;

case PortDisconnected:


+ 3
- 2
engine.c View File

@@ -1834,14 +1834,14 @@ jack_port_do_connect (jack_engine_t *engine,

pthread_mutex_lock (&engine->graph_lock);

if (dstport->shared->type_info.mixdown == NULL && dstport->connections) {
if (dstport->connections && dstport->shared->type_info.mixdown == NULL) {
jack_error ("cannot make multiple connections to a port of type [%s]", dstport->shared->type_info.type_name);
free (connection);
return -1;
} else {
dstport->connections = g_slist_prepend (dstport->connections, connection);
srcport->connections = g_slist_prepend (srcport->connections, connection);
jack_sort_graph (engine, FALSE);
jack_send_connection_notification (engine, srcport->shared->client_id, src_id, dst_id, TRUE);
@@ -2305,6 +2305,7 @@ jack_audio_port_mixdown (jack_port_t *port, nframes_t nframes)

node = port->connections;
input = (jack_port_shared_t *) node->data;

memcpy (port->shared->buffer, input->buffer, sizeof (sample_t) * nframes);
for (node = g_slist_next (node); node; node = g_slist_next (node)) {


+ 7
- 7
jack/port.h View File

@@ -27,7 +27,7 @@
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
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.
*/
@@ -55,10 +55,10 @@ typedef struct _jack_port_shared {
void *buffer;
unsigned long flags;
unsigned long buffer_size;
jack_port_id_t id;
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;
jack_port_type_info_t type_info;
jack_client_id_t client_id;

char in_use : 1;
char locked : 1;
@@ -71,9 +71,9 @@ typedef struct _jack_port_shared {

struct _jack_port {
struct _jack_port_shared *shared;
GSList *connections;
GSList *connections;
struct _jack_port *tied;
void *own_buffer;
void *own_buffer;
};

/* this is the structure allocated by the engine in local
@@ -82,7 +82,7 @@ struct _jack_port {

typedef struct _jack_port_internal {
struct _jack_port_shared *shared;
GSList *connections;
GSList *connections;
} jack_port_internal_t;

#endif /* __jack_port_h__ */


+ 11
- 0
jackd.c View File

@@ -53,6 +53,17 @@ catch_signals (void)
sigaddset(&signals, SIGTTIN);
sigaddset(&signals, SIGTTOU);

/* this can make debugging a pain, but it also makes
segv-exits cleanup after themselves rather than
leaving the audio thread active. i still
find it truly wierd that _exit() or whatever is done
by the default SIGSEGV handler does not
cancel all threads in a process, but what
else can we do?
*/

sigaddset(&signals, SIGSEGV);

/* all child threads will inherit this mask */

pthread_sigmask (SIG_BLOCK, &signals, 0);


Loading…
Cancel
Save