obs-audio-monitor
obs-audio-monitor copied to clipboard
Support Push To Talk
As far as I can tell PTT does not work with this filter (sound still gets passed through). It seem that OBS does not actually mute the source when you have PTT active. So it would be great if this filter checked if PTT is active as well and not only if it's muted.
Edit; found a workaround https://github.com/upgradeQ/obs-filter-hotkeys (with another filter that mutes it). I also coped the third option and created a 4th that toggles off rather than on when a button is pushed)
Additions:
filter.hotkeys["4;" .. source_name .. ";" .. filter_name] = function(pressed)
if pressed then
obs.obs_source_set_enabled(v,false)
else
obs.obs_source_set_enabled(v,true)
end
end
elseif k:sub(1,1) == "4" then -- for hold hotkeys which start with 4 symbol
filter.hk[k] = obs.obs_hotkey_register_frontend(k, k, function(pressed)
if pressed then filter.hotkeys[k](true)
else
filter.hotkeys[k](false)
end
end)
OBS does not actually mute the source when using PTT and as far as I know there is no way for plugins to know the internal PTT state of a source.
I have never worked with OBS plugins so you probably know better I noticed there is something called "obs_source_push_to_talk_enabled" in the documentation. Another way to do it would be to add keytbindings for the filter itself. Either way the workaround works fine for me so I guess there is no rush to implement a fix for this.