diff --git a/include/avnd/wrappers/process/base.hpp b/include/avnd/wrappers/process/base.hpp index 805023c7..496112d6 100644 --- a/include/avnd/wrappers/process/base.hpp +++ b/include/avnd/wrappers/process/base.hpp @@ -17,7 +17,16 @@ #include #include #include -// #define AVND_ENABLE_SAFE_BUFFER_STORAGE 1 + +// The effect must always receive valid, zero-filled channel buffers. When a host +// supplies fewer channels than the object declares (e.g. an unconnected input), +// the missing channels must point at silent scratch buffers -- otherwise the +// effect dereferences a null channel pointer and crashes. This is a core +// invariant, so it is on by default; define AVND_ENABLE_SAFE_BUFFER_STORAGE=0 +// before including to opt out. +#ifndef AVND_ENABLE_SAFE_BUFFER_STORAGE +#define AVND_ENABLE_SAFE_BUFFER_STORAGE 1 +#endif namespace avnd {