Recording the output into mp3/m4a

Add the option to record to mp3 or m4a.