setChunk return value
-
- KVRian
- Topic Starter
- 1273 posts since 9 Jan, 2006
I've just implemented chunks for my VST plugin and was wondering what the return value of setChunk should be. 0 for a fail 1 for success? I can't imagine this value making much difference, but perhaps there are some host that are picky about it?
Cheers,
Matt
Cheers,
Matt
- KVRAF
- 7896 posts since 12 Feb, 2006 from Helsinki, Finland
I just always return 0 and things work.
edit: note that documentation doesn't seem to specify anything..
edit: note that documentation doesn't seem to specify anything..
- KVRAF
- 12555 posts since 7 Dec, 2004
Another one of those weird parts of VST that aren't explained, most likely because there isn't any explanation.
When they implemented it they probably had no use for it. Although I would have returned an error code with several values such as:
Then the host could tell you "we tried to load a chunk and the plugin says: wrong format" and allow you to dump the chunk or import a replacement and so on. Only VST was never designed that way for some reason...
When they implemented it they probably had no use for it. Although I would have returned an error code with several values such as:
Code: Select all
enum setchunk_error
{
setchunk_no_error = 0,
setchunk_error, // use if no other appropriate code
setchunk_wrong_format, // identifying data in chunk not what was expected
setchunk_wrong_size, // size of chunk not what was expected
setchunk_bad_data, // data in chunk corrupt
};
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.
-
- KVRian
- 1256 posts since 15 Mar, 2007 from Yorkshire, England
which is a classic example of how messy 2.4 is, we really needed something better, perhaps not 3 though
-
- KVRian
- Topic Starter
- 1273 posts since 9 Jan, 2006
Well, I'd probably describe this example as a bit untidy rather than messy. I mean just a small comment in the code saying the return value had been reserved for future error codes would have been enough.
They could then implement that in VST2.5 after they bin VST3
They could then implement that in VST2.5 after they bin VST3
-
- KVRAF
- 8388 posts since 11 Apr, 2003 from back on the hillside again - but now with a garden!
Was about to post the same thing..matt42 wrote:Well, I'd probably describe this example as a bit untidy rather than messy. I mean just a small comment in the code saying the return value had been reserved for future error codes would have been enough.
They could then implement that in VST2.5 after they bin VST3
- KVRAF
- 12555 posts since 7 Dec, 2004
Or alternatively we can just start using it right now, like I already do.
Ten years later you get a little tired of waiting.
Ten years later you get a little tired of waiting.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.