I use
Total Recorder Pro to do this. It has all the features you are looking for and a lot more -- it outputs many file types on the fly (including MP3, and flac), a scheduler for unattended recording, and an excellent audio editor.
My radio source is a stereo receiver connected to a PC through a sound card. To get high quality sound, I use an M-Audio Transit USB sound adapter, which is no longer made or supported, but you can get a
Behringer UCA222 for about $30, which should do just as well. If you are not concerned about audio quality, you can connect any radio to the line input of your computer sound card.
Tune-In Radio Pro ($0.99) will allow you to record Internet FM stations, as will a number of other Android and iOS apps, but you won't get the quality you get by recording from an FM radio using Total Recorder and a good sound adapter.