format_version = "1.0" rtc_bindings = { -- Here we set up changes to properties and the "event" callback function that will be called. Note that there WILL -- be an initial call for these properties when initializing a device. Note that all RTC scripts are completely run -- before the first call to RenderRealtime { source = "/environment/instance_id", dest = "/global_rtc/init_instance" }, { source = "/environment/system_sample_rate", dest = "/global_rtc/on_samplerate_changed" }, --{ source = "/custom_properties/sample_sound", dest = "/global_rtc/on_sample_sound_progress" }, } global_rtc = { init_instance = function(source_property_path, instance_id) local new_no = jbox.make_native_object_rw("Instance", {instance_id}) jbox.store_property("/custom_properties/instance", new_no); end, on_samplerate_changed = function (source_property_path, new_sample_rate) jbox.trace("On sample rate changed to " .. new_sample_rate); end, } sample_rate_setup = { native = { 22050, 44100, 48000, 88200, 96000, 192000 }, }