[PD-cvs] pd/src s_audio_jack.c,1.5.4.8.2.7.2.12,1.5.4.8.2.7.2.13
Mathieu Bouchard
matju at users.sourceforge.net
Tue Jul 31 01:53:39 CEST 2007
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5441
Modified Files:
Tag: desiredata
s_audio_jack.c
Log Message:
remove fprintf
Index: s_audio_jack.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_audio_jack.c,v
retrieving revision 1.5.4.8.2.7.2.12
retrieving revision 1.5.4.8.2.7.2.13
diff -C2 -d -r1.5.4.8.2.7.2.12 -r1.5.4.8.2.7.2.13
*** s_audio_jack.c 19 Jul 2007 21:09:18 -0000 1.5.4.8.2.7.2.12
--- s_audio_jack.c 30 Jul 2007 23:53:37 -0000 1.5.4.8.2.7.2.13
***************
*** 15,21 ****
static jack_nframes_t jack_filled = 0;
static float jack_outbuf[NUM_JACK_PORTS*BUF_JACK];
! static float jack_inbuf[NUM_JACK_PORTS*BUF_JACK];
static int jack_started = 0;
! static jack_port_t *input_port[NUM_JACK_PORTS];
static jack_port_t *output_port[NUM_JACK_PORTS];
static int outport_count = 0;
--- 15,21 ----
static jack_nframes_t jack_filled = 0;
static float jack_outbuf[NUM_JACK_PORTS*BUF_JACK];
! static float jack_inbuf[NUM_JACK_PORTS*BUF_JACK];
static int jack_started = 0;
! static jack_port_t * input_port[NUM_JACK_PORTS];
static jack_port_t *output_port[NUM_JACK_PORTS];
static int outport_count = 0;
***************
*** 33,37 ****
jack_out_max = max(int(nframes),JACK_OUT_MAX);
if (jack_filled >= nframes) {
! if (jack_filled != nframes) fprintf(stderr,"Partial read");
for (int j = 0; j < sys_outchannels; j++) {
float *out = (float *)jack_port_get_buffer(output_port[j], nframes);
--- 33,37 ----
jack_out_max = max(int(nframes),JACK_OUT_MAX);
if (jack_filled >= nframes) {
! if (jack_filled != nframes) post("Partial read");
for (int j = 0; j < sys_outchannels; j++) {
float *out = (float *)jack_port_get_buffer(output_port[j], nframes);
***************
*** 78,86 ****
if (status == ETIMEDOUT) {
/* we're late ... lets hope that jack doesn't kick us out */
! post("timeout %d", (timeout));
sys_log_error(ERR_SYSLOCK);
return 0;
} else {
! post ("sys_timedlock returned %d", status);
return 0;
}
--- 78,86 ----
if (status == ETIMEDOUT) {
/* we're late ... lets hope that jack doesn't kick us out */
! error("timeout %d", (timeout));
sys_log_error(ERR_SYSLOCK);
return 0;
} else {
! post("sys_timedlock returned %d", status);
return 0;
}
***************
*** 111,115 ****
static int jack_ignore_graph_callback = 0;
static t_int jack_shutdown_handler(t_int* none) {
! post("jack kicked us out ... trying to reconnect");
jack_ignore_graph_callback = 1;
/* clean up */
--- 111,115 ----
static int jack_ignore_graph_callback = 0;
static t_int jack_shutdown_handler(t_int* none) {
! error("jack kicked us out ... trying to reconnect");
jack_ignore_graph_callback = 1;
/* clean up */
***************
*** 178,182 ****
for (int i=0;jack_ports[i] != 0 && i < sys_inchannels;i++)
if (jack_connect (jack_client, jack_ports[i], jack_port_name (input_port[i])))
! fprintf (stderr, "cannot connect input ports %s -> %s\n", jack_ports[i],jack_port_name(input_port[i]));
free(jack_ports);
jack_ports = jack_get_ports(jack_client, regex_pattern, 0, JackPortIsInput);
--- 178,182 ----
for (int i=0;jack_ports[i] != 0 && i < sys_inchannels;i++)
if (jack_connect (jack_client, jack_ports[i], jack_port_name (input_port[i])))
! error("cannot connect input ports %s -> %s", jack_ports[i],jack_port_name(input_port[i]));
free(jack_ports);
jack_ports = jack_get_ports(jack_client, regex_pattern, 0, JackPortIsInput);
***************
*** 184,188 ****
for (int i=0;jack_ports[i] != 0 && i < sys_outchannels;i++)
if (jack_connect (jack_client, jack_port_name (output_port[i]), jack_ports[i]))
! fprintf (stderr, "cannot connect output ports %s -> %s\n", jack_port_name(output_port[i]),jack_ports[i]);
free(jack_ports);
return 0;
--- 184,188 ----
for (int i=0;jack_ports[i] != 0 && i < sys_outchannels;i++)
if (jack_connect (jack_client, jack_port_name (output_port[i]), jack_ports[i]))
! error("cannot connect output ports %s -> %s",jack_port_name(output_port[i]),jack_ports[i]);
free(jack_ports);
return 0;
***************
*** 203,214 ****
char port_name[80] = "";
int new_jack = 0;
! if (outchans > NUM_JACK_PORTS) {
! fprintf(stderr,"%d output ports not supported, setting to %d\n",outchans, NUM_JACK_PORTS);
! outchans = NUM_JACK_PORTS;
! }
! if (inchans > NUM_JACK_PORTS) {
! fprintf(stderr,"%d input ports not supported, setting to %d\n",inchans, NUM_JACK_PORTS);
! inchans = NUM_JACK_PORTS;
! }
if (jack_client && scheduler != sys_getscheduler()) {
jack_client_close(jack_client);
--- 203,208 ----
char port_name[80] = "";
int new_jack = 0;
! if (outchans > NUM_JACK_PORTS) {post("%d output ports not supported, setting to %d",outchans, NUM_JACK_PORTS); outchans = NUM_JACK_PORTS;}
! if ( inchans > NUM_JACK_PORTS) {post( "%d input ports not supported, setting to %d", inchans, NUM_JACK_PORTS); inchans = NUM_JACK_PORTS;}
if (jack_client && scheduler != sys_getscheduler()) {
jack_client_close(jack_client);
***************
*** 273,278 ****
/* tell the JACK server that we are ready to roll */
if (new_jack) {
! if (jack_activate (jack_client)) {
! fprintf (stderr, "cannot activate client\n"); sys_inchannels = sys_outchannels = 0; return 1;}
memset(jack_outbuf,0,sizeof(jack_outbuf));
if (jack_client_names[0]) jack_connect_ports(jack_client_names[0]);
--- 267,271 ----
/* tell the JACK server that we are ready to roll */
if (new_jack) {
! if (jack_activate (jack_client)) {error("cannot activate client"); sys_inchannels = sys_outchannels = 0; return 1;}
memset(jack_outbuf,0,sizeof(jack_outbuf));
if (jack_client_names[0]) jack_connect_ports(jack_client_names[0]);
***************
*** 337,341 ****
}
! void jack_listdevs () {post("device listing not implemented for jack yet\n");}
static const char ** jack_in_connections[NUM_JACK_PORTS]; /* ports connected to the inputs */
--- 330,334 ----
}
! void jack_listdevs () {error("device listing not implemented for jack yet\n");}
static const char ** jack_in_connections[NUM_JACK_PORTS]; /* ports connected to the inputs */
***************
*** 366,370 ****
if (!port) break; /* we've connected all incoming ports */
int status = jack_connect(jack_client, port, jack_port_name(input_port[i]));
! if (status) post("cannot connect input ports %s -> %s", port, jack_port_name (input_port[i]));
}
}
--- 359,363 ----
if (!port) break; /* we've connected all incoming ports */
int status = jack_connect(jack_client, port, jack_port_name(input_port[i]));
! if (status) error("cannot connect input ports %s -> %s", port, jack_port_name (input_port[i]));
}
}
***************
*** 375,379 ****
if (!port) break; /* we've connected all outgoing ports */
int status = jack_connect(jack_client, jack_port_name(output_port[i]), port);
! if (status) post("cannot connect output ports %s -> %s", jack_port_name(output_port[i]), port);
}
}
--- 368,372 ----
if (!port) break; /* we've connected all outgoing ports */
int status = jack_connect(jack_client, jack_port_name(output_port[i]), port);
! if (status) error("cannot connect output ports %s -> %s", jack_port_name(output_port[i]), port);
}
}
More information about the Pd-cvs
mailing list