git ssb

0+

cel / foostudio



Tree: bb4c57ab9509dfe407fa6359c04c79270e64bd18

Files: bb4c57ab9509dfe407fa6359c04c79270e64bd18 / 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