hdf-0.14: c/text-dl.h
#include <stdbool.h>
struct world {
void *st; /* graph state */
float sr; /* sample rate */
int nk; /* number of controls */
float *ctl; /* control data */
int nb; /* number of buffers */
int *bl; /* buffer sizes */
float **bd; /* buffer data */
};
#define df_world struct world
#define w_state(w) (w)->st
#define w_sr(w) (w)->sr
#define w_c_get1(w,i) (w)->ctl[(i)]
#define w_c_set1(w,i,n) (w)->ctl[(i)]=(n)
#define w_in1(w,i) 0
#define w_out1(w,i,n) printf("%d: %f\n",i,n)
#define w_out2(w,i,n1,n2) printf("%d: %f, %f\n",i,n1,n2)
#define w_b_read1(w,b,i) (w)->bd[(b)][(i)]
#define w_b_write1(w,b,i,n) (w)->bd[(b)][(i)]=(n)