As we approached (in the comments to the question) with the conclusion that it would be better to record a radio stream instead of recording from a sound card:
Check out Indy , Synapse or ICS . (Delphi comes with Indy out of the box)
There should be examples for each of these components that show how to read data from an HTTP / TCP server.
Keep in mind that the data is probably not just plain MP3 or WMV, but usually there is a crop that inserts header information and divides the audio data into pieces.
There are many streaming servers (i.e. Shoutcast , Icecast , etc.) that have different ways of encoding audio data.
First you need to find out what type of streaming server works in your internet radio. The first thing that happens when sending an HTTP GET request is usually a response that has some identification information.
You can also get only a playlist file that has a real URL inside.
PS: You might want to find (or ask) additional questions about SO to get more information about the topics that I mentioned.
Hope this helps.
source share