Created attachment 95 [details] sample=*silence support There is a possibility within sample opcode http://www.sfzformat.com/index.php?title=Sample to extend it with *silence value, to get a silent region (similar effect to setting end=-1, but without actually loading the sample). Linuxsampler already checks if sample is silent in sfz::Engine::LaunchVoice(), so this is a very minor change to enhance this behaviour.
I just reviewed your patch. The only minor thing questionable is that you call GetInstrument()->GetSampleManager()->AddSampleConsumer(pSample, this); with pSample being a NULL pointer. As far as I can see it calling AddSampleConsumer in case of a silent sample should not be required, so if you don't mind I will just change that.
Yeah, missed it.
I committed the changes (SVN r3497). I also added a warning message in case an unknown/unsupported built-in sample type is used. Updated the docs as well (site will be auto updated in about 30 minutes): http://doc.linuxsampler.org/sfz/sample_opcode/