ref: 9e1e20f6b9552189fef5111638f84d944fd6451b
dir: /dat.h/
typedef struct Chunk Chunk; typedef struct Dot Dot; typedef struct Buf Buf; typedef intptr ssize; enum{ Rate = 44100, WriteRate = 25, WriteDelay = Rate / WriteRate, /* 1764 default delay */ Sampsz = 2 * 2, Outsz = WriteDelay * Sampsz, Chunksz = Sampsz * Rate, }; #pragma incomplete Buf struct Chunk{ Buf *b; usize boff; usize len; Chunk *left; Chunk *right; }; struct Dot{ ssize trk; usize from; usize to; usize cur; ssize off; usize totalsz; Chunk *norris; }; extern Dot dot; extern Dot *current; extern QLock lsync; enum{ Drawcur, Drawrender, Drawall, }; extern int stereo; extern int debug, paused; extern int debugdraw; #define MIN(x,y) ((x) < (y) ? (x) : (y)) #define MAX(x,y) ((x) > (y) ? (x) : (y))