Chris Grigg wrote on Wednesday
Seems as though you might want to make this a per-buffer property under plug control, called something like always-feed, so that the host can know whether or not there's a need to provide a zero-buffer when the user hasn't connected a source for that buffer. <<<
Definitely, it needs to be per buffer property.
Also, there's a cute way to implement this that allows a plugin to not care about magic zero fill if it doesn't want to. You do something like this:
class AudioBuffer { bool IsZero() const; void SetZero( bool ); float* GetPointer(); float* GetRawPointer(); };
All AudioBuffers are created by an allocator that knows (or doesn't<g> about zero fill. If a plugin wants, it can ask IsZero() everywhere to bypass processing. It it doesn't care, it can call GetPointer(). GetPointer() will zerofill before returning the buffer if the buffer is tagged as zero. (Use GetRawPointer to avoid the magic.)
---------------------------------------------------------------------- Generalized Music Plugin Interface (GMPI) public discussion list Participation in this list is contingent upon your abiding by the following rules: Please stay on topic. You are responsible for your own words. Please respect your fellow subscribers. Please do not redistribute anyone else's words without their permission.
Archive: //www.freelists.org/archives/gmpi Email gmpi-request@xxxxxxxxxxxxx w/ subject "unsubscribe" to unsubscribe