Last active
September 19, 2022 13:43
-
-
Save upgradeQ/b2412242d76790d7618d6b0996c4562f to your computer and use it in GitHub Desktop.
Beep when the replay buffer has fully stopped. [windows]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local obs = obslua | |
local ffi = require("ffi") | |
ffi.cdef[[ | |
void Beep(int freq,int dur); | |
]] | |
function beep() | |
ffi.C.Beep(7000,300) | |
end | |
function on_event(event) | |
if event == obs.OBS_FRONTEND_EVENT_REPLAY_BUFFER_STOPPED | |
then beep() | |
end | |
end | |
function script_load(settings) | |
obs.obs_frontend_add_event_callback(on_event) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment