예제 #1
0
void SDIFranges_GetColumnRanges(SDIFranges *x, t_symbol *matrixTypeSym) {
    char matrixType[4];
	sdif_int32 numCols;
	int i;
    
    if (resolveBufferAndMatrixType(x, matrixTypeSym, matrixType)) {
		if (doGetMaxNumColumns(x, matrixType, &numCols)) {
			t_atom *outputArgs = (Atom *) getbytes(numCols * sizeof(t_atom));
			sdif_float64 *mins = (sdif_float64 *) getbytes16(numCols * sizeof(sdif_float64));
			sdif_float64 *maxes = (sdif_float64 *) getbytes16(numCols * sizeof(sdif_float64));
			
			if (maxes == 0) {
				object_error((t_object *)x, NAME ": out of memory");
				return;
			}
			SDIFbuf_GetColumnRanges(x->t_buf, matrixType, numCols, mins, maxes);
			
			for (i = 0; i<numCols; ++i) {
				atom_setfloat(outputArgs+i, (float) mins[i]);
			}
			outlet_anything(x->t_out, ps_column_mins, numCols, outputArgs);
			
			for (i = 0; i<numCols; ++i) {
				atom_setfloat(outputArgs+i, (float) maxes[i]);
			}
			outlet_anything(x->t_out, ps_column_maxes, numCols, outputArgs);
			
			freebytes(outputArgs, numCols * sizeof(t_atom));
			freebytes16((char *)mins, numCols * sizeof(sdif_float64));
			freebytes16((char *)maxes, numCols * sizeof(sdif_float64));
		}
	}
}
예제 #2
0
void errfilt_init(t_errfilt *x) {
	x->a_b = (t_float *) getbytes16( MAX_ORDER * sizeof(t_float));
	x->a_bBuff = (t_float *) getbytes( MAX_ORDER * sizeof(t_float));
	x->a_x = (t_float *) getbytes16( MAX_ORDER * sizeof(t_float));
	x->a_A = (t_float *) getbytes( MAX_ORDER * sizeof(t_float));
	x->a_tempVec = (t_float *) getbytes16( MAX_ORDER * sizeof(t_float)); 
	errfilt_clear(x);
}