vst-rs icon indicating copy to clipboard operation
vst-rs copied to clipboard

Improve errors in PluginLoader::load()

Open Boscop opened this issue 8 years ago • 0 comments

In PluginLoader::load() when the VST file path exists but is the wrong bit size (e.g. trying to load a 32-bit VST in a 64-bit host), it returns PluginLoadError::InvalidPath which is confusing. It should only return that when !path.exists(), there should be a different error for failing to load the VST from the existing path.

Also, some VSTs, like the "kjaerhus audio classic series" only export a "main" function, not "VSTPluginMain". For those plugins it currently returns PluginLoadError::NotAPlugin but it should also be more differentiated. Either it should still load the VST with the "main" func or return a more useful error.

Also, it would make sense to take P: AsRef<Path> instead of &Path in load()..

Boscop avatar Dec 05 '17 09:12 Boscop