i’d like to listen to a shoutcast stream with fmod, is that possible ?

Let’s say i’d like to listen to (that’s the Digitally Imported stream url)

how would i do that ?

FSOUND_Init(44100, 16, 0);

stream = FSOUND_Stream_OpenFile("", FSOUND_OUTPUT_WINMM, 200);
if (!stream)
FSOUND_Stream_Play(FSOUND_FREE, stream);


would that work ? or is it impossible to do atm ? 😮

  • You must to post comments

I dont believe that you can stream files off of the internet via shoutcast with FMOD but maybe I’m wrong! 😀

  • You must to post comments

I’ve been looking into it, and it’s not “impossible” to load a shoutcast stream and still use FMOD, but FMOD will not stream a Shoutcast URL directly.

For example, if you have an MP3 file residing on some server, you can stream that file, because FMOD basically plays it back as it downloads. But Shoutcast is a much different protocol than simple streaming.

Shoutcast instead requires a special type of negotiation process, which is why you connect to a .pls file, and then (I haven’t looked into the details) it sends the MP3 stream to the PC/client.

If you can figure out a way to perform the negotiation process (and someone may have written an API out there to do that [I haven’t found it though]) and then load the MP3 data to a buffer in memory (using memcpy), you can then load that buffer using FSOUND_LOADMEMORY flag with FSOUND_Stream_OpenFile() and stream it from memory.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.