added windows support for toggling sampling at runtime, and stubs for other platforms + lua bindings