git ssb

0+

cel / foostudio



Tree: 033d2aa1890af2ff80fde819e83b034484c47cbc

Files: 033d2aa1890af2ff80fde819e83b034484c47cbc / tune.h

394 bytesRaw
1#pragma once
2
3typedef float play_fn(void *, double time, float in, unsigned char midi_cmd[3]);
4
5#define struct_init(ptr) _struct_init((void **)ptr, sizeof(*ptr))
6#define array_init(ptr, len) _struct_init((void **)ptr, sizeof(*ptr) * len)
7
8static inline int _struct_init(void **ptr, size_t size)
9{
10 if (*ptr) return 0;
11 if ((*ptr = calloc(size, 1))) return 0;
12 return 1;
13}
14
15extern play_fn play;
16

Built with git-ssb-web