#pragma once struct foobuf { size_t len; size_t offset; float *data; }; int foobuf_init(struct foobuf **, size_t len); float foobuf_read(struct foobuf *buf, size_t offset); void foobuf_write(struct foobuf *buf, float val);