static void capture_open(t_capture *x) { int count = x->x_count; char buf[MAXPDSTRING]; hammereditor_open(x->x_filehandle, "Capture", ""); /* CHECKED */ if (count < x->x_bufsize) { float *bp = x->x_buffer; int col = 0; while (count--) col = capture_appendfloat(x, *bp++, buf, col); } else { float *bp = x->x_buffer + x->x_head; int col = 0; count = x->x_bufsize - x->x_head; while (count--) col = capture_appendfloat(x, *bp++, buf, col); bp = x->x_buffer; count = x->x_head; while (count--) col = capture_appendfloat(x, *bp++, buf, col); } }
/* CHECKED blank line between blocks */ static void capture_open(t_capture *x) { int count = x->x_count; char buf[MAXPDSTRING]; int nindices = (x->x_nindices > 0 ? x->x_nindices : x->x_nblock); hammereditor_open(x->x_filehandle, "Signal Capture", ""); /* CHECKED */ if (x->x_mode == 'f' || count < x->x_bufsize) { float *bp = x->x_buffer; int col = 0, i; for (i = 1; i <= count; i++) col = capture_appendfloat(x, *bp++, buf, col, ((i % nindices) == 0)); } else { float *bp = x->x_buffer + x->x_head; int col = 0, i = x->x_bufsize; count = x->x_bufsize - x->x_head; while (count--) col = capture_appendfloat(x, *bp++, buf, col, ((--i % nindices) == 0)); bp = x->x_buffer; count = x->x_head; while (count--) col = capture_appendfloat(x, *bp++, buf, col, ((count % nindices) == 0)); } }
/* CHECKED not available, LATER full editing */ static void prob_click(t_prob *x, t_floatarg xpos, t_floatarg ypos, t_floatarg shift, t_floatarg ctrl, t_floatarg alt) { t_probtrans *state; char buf[64]; hammereditor_open(x->x_filehandle, 0, 0); for (state = x->x_translist; state; state = state->tr_nextstate) { t_probtrans *trans; for (trans = state->tr_nexttrans; trans; trans = trans->tr_nexttrans) { sprintf(buf, "%d %d %d\n", state->tr_value, trans->tr_value, trans->tr_count); hammereditor_append(x->x_filehandle, buf); } } }