I havent tested your function at all, but may do later when I have more time...
But I can see this whole detection revolves around the detected skin names.
So it shouldnt be too hard to re-work for multi-texture at least.
BUT, after taking more of a look. It is much more involved with multi-tex surfaces.
Referencing all three multi-texturing skins and extracting pixels at
the contacted UV co-ord, and then getting its alpha...
AND THEN doing the same for the other two skins,
AND THEN picking the highest alpha of all three,
and passing 1,2 or 3 to the sound-player is a lot of work...
So Im hoping you can figure out code for what Ive just said,
or better yet...
Someone else has a better idea!! Mine is hard work...
Sorry dude...