Fixed audio source update I broke earlier :/
This commit is contained in:
parent
ecfac47c9a
commit
91b05d2965
1 changed files with 1 additions and 6 deletions
|
|
@ -53,16 +53,11 @@ function timer_callback()
|
|||
-- get settings of a slave source
|
||||
local slave_props = obs.obs_source_get_settings(slave_source)
|
||||
-- also read the slave props, no need to update anything if there's no need to update anything ;)
|
||||
local slave_window = obs.obs_data_get_string(master_props, 'window')
|
||||
local slave_window = obs.obs_data_get_string(slave_props, 'window')
|
||||
|
||||
if slave_window ~= master_window then
|
||||
-- now that we have both, create a NEW temporary data object (again, no other way from lua, except ffi since 2020)
|
||||
local new_slave_props = obs.obs_data_create()
|
||||
-- copy/paste the window property from the master to the slave
|
||||
obs.obs_data_set_string(slave_props, 'window', master_window)
|
||||
-- set the new temporary data object as properties for the slave source
|
||||
obs.obs_data_set_obj(new_slave_props, "sourceSettings", slave_props)
|
||||
|
||||
-- the copied source won't update unless...
|
||||
obs.obs_source_update(slave_source, slave_props)
|
||||
--obs.obs_frontend_open_source_properties(slave_source_name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue