1

I am trying build an C++ application, which will try to connect Shoutcast/Icecast server, get an audio file, then stream the audio file into audio device. There is winamp application in windows, which already does the same. But I would like the same kind of application in C++. I have read the http://www.smackfu.com/stuff/programming/shoutcast.html link. But not sure how I should start. I would need specific help on this: a) How do I connect to shotcast server? b) get the audio file url? c) How should I start streaming? I have built one socket program which can connect to server, can send/recv binary data. Hope this can help here. But I am unable to start on above three points? I have read stackoverflow urls on this:

Stream getUserMedia to an Icecast server? Audio streaming using C++ tutorial and sample code http://forums.radiotoolbox.com/viewtopic.php?t=74

But could not help much. Can you please help me on this?

Community
  • 1
  • 1

1 Answers1

1

SHOUTcast/Icecast are essentially HTTP. You should be searching on how to make an HTTP request.

There is a small difference for SHOUTcast servers though... the status line they return is non-standard:

ICY 200 OK

A normal status line would be:

HTTP/1.1 200 OK

Once you learn how to make an HTTP request, you will be streaming. Later on if you want to get the metadata, you can follow the SmackFu link you posted.

Brad
  • 159,648
  • 54
  • 349
  • 530