Error with shoutcast radio stream

I’m trying to play a shoutcast radio stream.

Using the following code and a shoutcast URL results in an HTTP error:

result = system->createStream(“http://yp.shoutcast.com/sbin/tunein-station.pls?id=1817772”, FMOD_DEFAULT, NULL, &musicSound);

However, using VLC to find the location url does work:

result = system->createStream(“http://78.47.158.100:8080/dance.mp3”, FMOD_DEFAULT, NULL, &musicSound);

The docs say FMOD should work with shoucast and .pls files.
Any ideas?

Have you tried our net_stream example?

There is some extra code required for reading the entries in a playlist, then opening those streams.
The example shows how to do that.

Hi Mathew,

I’ve tried the net_steam example and that failed also. Here are my findings:

  1. The example URL works fine.

  2. The shoutcast URL ( http://yp.shoutcast.com/sbin/tunein-station.pls?id=1817772 ) fails with ‘Error 19 Unsupported file or audio format’
    However, I can see that it’s trying to connect to ‘31.12.71.119:80’ which seems to be a placeholder shouctcast page and not an actual radio address.

  3. Direct URL to the station does work ( http://78.47.158.100:8080/dance.mp3 ). So the above format error does not apply to the actual station.

  4. Another example URL ( http://www.defjay.de/listen.pls ) fails with generic ‘Error 21 - HTTP Error’

All of the above URLs work fine with BASS net radio code, so something is not quite right in the FMOD code.

Any ideas?

I have found an internal error in our processing of server response headers causing this to all fall over. It’s an easy fix and will be corrected in our next release. The issue is isolated to that server and any others that work the same way, unfortunately there is no work around.

Great, glad you’ve found a fix.
Is there an ETA on the next release?

Should be about 2 to 3 weeks away.

1 Like