If it happens on several ROMs, then it can only be one of 2 things.
Hardware fault. Or a bad app you installed.
Flashing a new rom is a fresh start....its highly unlikely they all have sound glitches. And its not drivers. Everything system related is flashed new when you flash a new rom.
Anyway, to prove if its hardware or not, you pretty much need to return to stock. If you still have no sound, its extremely likely its hardware related. In which case, repair or exchange is your only option.
Here's a return to stock thread. Again.....if you need any help returning to stock, you will have to post some useful posts and get to the 10 post count, then ask your questions in the rom threads.
http://xdaforums.com/showthread.php?t=2265477
Again, good luck!
---------- Post added at 08:32 PM ---------- Previous post was at 08:28 PM ----------
One last thing. Why not post your issue in the Q&A section? It will help with your post count.
http://xdaforums.com/galaxy-s4/help
XDA Assist is about directing users who can't find their way. The path has been shown to you and now you need to utilize the resources and device experts in your phones section.
Hope it all works out. ?
---------- Post added at 08:48 PM ---------- Previous post was at 08:32 PM ----------
And see this thread. You need Mega app and free account, but similar issue and worked for the member.
Tho....flash at own risk of course. I know nothing of the procedure and haven't used it.
http://xdaforums.com/showthread.php?t=2612167