What is KVR Audio? | Submit News | Advertise | Developer Account

Options (Affects News & Product results only):

OS:
Format:
Include:
Quick Search KVR

"Quick Search" KVR Audio's Product Database, News Items, Developer Listings, Forum Topics and videos here. For advanced Product Database searching please use the full product search. For the forum you can use the phpBB forum search.

To utilize the power of Google you can use the integrated Google Site Search.

Products 0

Developers 0

News 0

Forum 0

Videos 0

Search  

setChunk return value

DSP, Plug-in and Host development discussion.

Moderator: Moderators (Main)

KVRian
 
608 posts since 9 Jan, 2006

Postby matt42; Thu Feb 06, 2014 11:53 pm setChunk return value

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
KVRAF
 
4078 posts since 11 Feb, 2006, from Helsinki, Finland
 

Postby mystran; Fri Feb 07, 2014 12:51 am Re: setChunk return value

I just always return 0 and things work. :P

edit: note that documentation doesn't seem to specify anything..
Image <- plugins | forum
User avatar
KVRAF
 
8950 posts since 7 Dec, 2004, from Vancouver, Canada
 

Postby aciddose; Fri Feb 07, 2014 1:41 am Re: setChunk return value

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:

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
};


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...
KVRian
 
608 posts since 9 Jan, 2006

Postby matt42; Fri Feb 07, 2014 8:29 am Re: setChunk return value

Thanks mystran,

I had assumed as much, but it helps to hear that from someone with releases tested out in the wild.
KVRian
 
1017 posts since 15 Mar, 2007, from Yorkshire, England
 

Postby Keith99; Fri Feb 07, 2014 9:25 am Re: setChunk return value

which is a classic example of how messy 2.4 is, we really needed something better, perhaps not 3 though :)
KVRian
 
608 posts since 9 Jan, 2006

Postby matt42; Sat Feb 08, 2014 1:44 am Re: setChunk return value

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 :hihi:
KVRAF
 
8367 posts since 11 Apr, 2003, from now on the flat
 

Postby duncanparsons; Sat Feb 08, 2014 4:00 am Re: setChunk return value

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 :hihi:
Was about to post the same thing..
Image
User avatar
KVRAF
 
8950 posts since 7 Dec, 2004, from Vancouver, Canada
 

Postby aciddose; Sat Feb 08, 2014 6:13 pm Re: setChunk return value

Or alternatively we can just start using it right now, like I already do.

Ten years later you get a little tired of waiting.

Moderator: Moderators (Main)

Return to DSP and Plug-in Development