Greetings. new_fluid_synth() returns a fluid_synth_t*, presumably so that the process can run multiple simultaneous synths presumably with different settings. But how common are multiple synths in practice ?
( Background: I'm maintaining a Lua module: http://www.pjb.com.au/comp/lua/fluidsynth.html http://luarocks.org/modules/peterbillam in which the C returns the fluid_synth_t* back into Lua (as an integer, currently) so that the app can run multiple synths. This has some drawbacks, including being a security weakness, also if the size of int is different from (especially less than!) the size of pointer. There are a number of solutions, but the simplest is to allow just one synth at once and keep its fluid_synth_t* in a static C variable. ( I could also keep a C-array of synths; or return the fluid_synth_t* as 'userdata' PiL p.194 and associated 'metatable' PiL p.197, which is the classy solution, but not so simple... ) ) Regards, Peter Billam http://www.pjb.com.au p...@pjb.com.au (03) 6278 9410 "Follow the charge, not the particle." -- Richard Feynman from The Theory of Positrons, Physical Review, 1949 _______________________________________________ fluid-dev mailing list fluid-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/fluid-dev