I separated this out into two slightly different versions due to the problems with argp, and the fact it's irrelevant to LV2 (we had a complaint about this). This was a temporary fix that I was never really happy about. I think I know a safe way out.
What I'm proposing is to move the whole of the argument parsing out of config() into a new file, say, cmdOptions() and have this called directly from standalone main() - the only thing that needs to read it. It can't action the commands at that point so what I'm thinking of is that instead, the commands as parsed should be added to a std::list and cmdOtions() would return a pointer to that list - or NULL if there are no entries. Just this pointer is then passed through synthEngine() to config() and if it's not NUll the commands are read, executed and the list deleted. LV2 would simply send NULL. The only file that would need to know anything about the original parsing would be cmdOptions(), and the only thing that sees this would be standalone main(). LV2 could then regain the same config() file which removes the risk of obscure issues when changes are made. Opinions anyone? -- Will J Godfrey https://willgodfrey.bandcamp.com/ http://yoshimi.github.io Say you have a poem and I have a tune. Exchange them and we can both have a poem, a tune, and a song. _______________________________________________ Yoshimi-devel mailing list Yoshimi-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/yoshimi-devel