git ssb

0+

cel / foostudio



Tree: 1d67f693f364e55fe7c4f752a49923bb51c6875b

Files: 1d67f693f364e55fe7c4f752a49923bb51c6875b / foobuf.h

409 bytesRaw
1#pragma once
2
3struct foobuf {
4 size_t len;
5 size_t offset;
6 float *data;
7};
8
9int foobuf_init(struct foobuf **, size_t len);
10float foobuf_read(struct foobuf *buf, size_t offset);
11void foobuf_write(struct foobuf *buf, float val);
12
13int _struct_init(void **, size_t);
14
15#define struct_init(ptr) _struct_init((void **)ptr, sizeof(**ptr))
16#define array_init(ptr, len) _struct_init((void **)ptr, sizeof(**ptr) * len)
17

Built with git-ssb-web