Actually, now that we're talking about sound kits, I remembered that PlaySound was replaced by PlaySoundkitID in 7.2(?) so you can actually mute sounds with a filthy little hack. PlaySoundkitID (and PlaySoundFile) both return handles in the form of an integer ID that increments on every call. So by hooking into PlaySound and playing another sound immediately after it you can figure out the sound handle ID and cancel it.
Lua Code:
local mutex = false -- need this so it doesn't recurse when PlaySound is called from within
hooksecurefunc('PlaySound', function(id)
if mutex then return end -- we called this time, just return
mutex = true -- flag mutex
-- play another sound to figure out the ID.
-- can't play the same sound because it's occupied by another handle.
local played, handle = PlaySound(id+1) -- just use the ID+1 to guarantee it's different
mutex = false -- unflag mutex
if played then
StopSound(handle-1) -- stop the sound you wanted to stop in the first place
StopSound(handle) -- stop your dummy sound
end
end)
This should effectively do what you asked for, without replacing the function and without spreading taint.