Total screen freeze in El Capitan, but audio keeps playing
If you still have another device around, you might try to SSH into your machine, as apparently only the GUI process is frozen. You'll be able to safely reboot your Mac using sudo reboot now.
Another hint on this is that the shutdown dialog still shows up if you press the shutdown button for 2-3 seconds.
This might also be a hint to the solution - it should suffice to restart the corresponding process, even though I don't know which one that is. Maybe someone with a little more expertise on the OS might be able to help here.