Skip to content

Instantly share code, notes, and snippets.

@upgradeQ
Last active September 19, 2022 13:43
Show Gist options
  • Save upgradeQ/b2412242d76790d7618d6b0996c4562f to your computer and use it in GitHub Desktop.
Save upgradeQ/b2412242d76790d7618d6b0996c4562f to your computer and use it in GitHub Desktop.
Beep when the replay buffer has fully stopped. [windows]
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