free-audio / clap

Audio Plugin API
https://cleveraudio.org/
MIT License
1.77k stars 100 forks source link

"size" in `clap_input_events_t` is ambiguous #158

Closed atsushieno closed 2 years ago

atsushieno commented 2 years ago

In include/clap/events.h, struct clap_input_events_t defines size function member.

https://github.com/free-audio/clap/blob/af1e05ce6487151c6b36003fdb47566dbb50194e/include/clap/events.h#L266

But what is "size" ? Length of event stream in bytes, or the total count of the messages? Typical other CLAP types say "count" when it returns a number of something, so maybe this is a bytes length? In either case, it should be clearly documented.

baconpaul commented 2 years ago

You are correct that "count" would be the consistent name; for clarity the API returns the number of events in the list not the number of bytes

abique commented 2 years ago

This struct abstracts a list/vector and in C++ people use size().

abique commented 2 years ago

I've added documentation on the next branch.