Skip to content

Instantly share code, notes, and snippets.

@DareFox
DareFox / README.md
Last active December 1, 2022 05:23 — forked from snakecase/Beep on replay buffer save.lua
OBS Lua: Sound notification on keybind [Windows]

A simple Lua script which plays a .wav sound whenever specified keybind was activated.

Originally script was specified only for Replay Buffer save event and it works not on Save button press, but when replay was saved in file. So there was delay between press and sound effect.

Now you can launch sound not on event, but on keybind, which solves delay problem.

Installation

  1. Download script and change PROP_AUDIO_FILEPATH to a path to the sound of your choosing. By default it's Windows Hardware Remove sfx

  2. Launch OBS -> Tools -> Scripts -> +

@upgradeQ
upgradeQ / beep.lua
Last active September 19, 2022 13:43
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