It is interesting that you are using opto-couplers instead of a gate driver IC and they work. Please post more details about your circuit.
What is the PWM frequency? What is the RMS output power? Do the Mosfets get hot?
TI.com has some good information on class D audio (PWM audio).
I am glad to see you working on it. My first try was too many years ago. Then again I played with it on vertical amplifiers in BIG tv sets.
Coilcraft.com has some filter coils for the output stage.
About scrap the project: Some time same happens to me. Some projects irritate me LOT and LOT so I scrap them and kick them like a base ball! Interesting thing is I bring them back by searching hardly.