free-audio / clap

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

File reference docs #149

Closed tim-janik closed 2 years ago

tim-janik commented 2 years ago

Provide a (currently missing) description for save_resources() based on discord discussions from last June.

tim-janik commented 2 years ago

FYI, Anklang trunk now implements CLAP_EXT_FILE_REFERENCE from the host side.

The docs that I was missing are contained in this pull request. Additionally, I think the docs should specify whether resource_id is expected to persist save_state+load_state, i.e. if it's a proper ID based on which the host can resolve missing files after load_state() for plugins that do not support get_blake3_digest().

The method get_file_size() is currently unused, I fail to see a good use for it… Also, the host functions changed() and set_dirty() are mere dummies in my implementation, because files are only ever collected upon save_state() and that first calls save_resources() unconditionally. I'd be happy to get input on these functions and learn what host scenarios could actually benefit from them.

About belongs_to_plugin_collection, it took me a while to figure why it's called plugin-collection. A DAW could of course detect host-collection files via path name checks. Maybe that info could be worth adding to the docs?

abique commented 2 years ago

Hi @tim-janik,

Thank you very much for the improvements! :+1:

Cheers, Alex