Sound Device

Hello!

Is there a way to create a virtual sound device that writes in mp3 (or other sound formats) every input that it receives.

Any help will be highly appreciated.