You can try this:
Code:
local t={}
hooksecurefunc("PlaySoundFile",function(...) tinsert(t,{debugstack(),"PlaySoundFile",...}) end)
SlashCmdList["SOUNDDEBUG"] = function(n)
n = tonumber(n)
if n and (t[n]) then
print(select(2,unpack(t[n])))
print((unpack(t[n])))
else
for n=1,#t do
print('#'..n,select(2,unpack(t[n])))
end
end
end
SLASH_SOUNDDEBUG1 = "/sounddebug"
How to use. Untested.
Leave it running in the background until the sound next occurs, do a /sounddebug to get the list of sounds played by addons this session, then use /sounddebug <num> to find the debug stack for it (which should contain the addon's folder).