clap

CLAP Audio Plugin API
Log | Files | Refs | README | LICENSE

commit ce4cac77c23aea11f1ce020e592f6721ed12a187
parent 1797cf45be1b17e50093f45eb45f6683ea22d895
Author: trinitou <debuggleburger@gmail.com>
Date:   Tue,  6 Dec 2022 07:40:08 +0100

move stream documentation to stream.h

Diffstat:
Minclude/clap/ext/state.h | 10----------
Minclude/clap/stream.h | 12++++++++++++
2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/include/clap/ext/state.h b/include/clap/ext/state.h @@ -10,16 +10,6 @@ /// values and non-parameter state. This is used to persist a plugin's state /// between project reloads, when duplicating and copying plugin instances, and /// for host-side preset management. -/// -/// ## Notes on using streams -/// -/// When working with `clap_istream` and `clap_ostream` objects to load and save -/// state, it is important to keep in mind that the host may limit the number of -/// bytes that can be read or written at a time. The return values for the -/// stream read and write functions indicate how many bytes were actually read -/// or written. You need to use a loop to ensure that you read or write the -/// entirety of your state. Don't forget to also consider the negative return -/// values for the end of file and IO error codes. static CLAP_CONSTEXPR const char CLAP_EXT_STATE[] = "clap.state"; diff --git a/include/clap/stream.h b/include/clap/stream.h @@ -3,6 +3,18 @@ #include "private/std.h" #include "private/macros.h" +/// @page Streams +/// +/// ## Notes on using streams +/// +/// When working with `clap_istream` and `clap_ostream` objects to load and save +/// state, it is important to keep in mind that the host may limit the number of +/// bytes that can be read or written at a time. The return values for the +/// stream read and write functions indicate how many bytes were actually read +/// or written. You need to use a loop to ensure that you read or write the +/// entirety of your state. Don't forget to also consider the negative return +/// values for the end of file and IO error codes. + #ifdef __cplusplus extern "C" { #endif