Author Topic: Some problem about using BASS_StreamCreateURL method.  (Read 187 times)

adrenl

  • Posts: 5
Hello!
I am adding the ability to listen to Net Radio to my music player written in C#(.NET 8.0). This is the code I used to load it:
Code: [Select]
if (Utils.IsUrl(file))  //Utils.IsURL() is a method used to determine whether text is a URL.
{
    hStream = Bass.BASS_StreamCreateURL(file, 0, 0, null, IntPtr.Zero);
}
else
{
    hStream = Bass.BASS_MusicLoad(file, 0, 0, BASSFlag.BASS_MUSIC_PRESCAN | BASSFlag.BASS_MUSIC_STOPBACK, 44100);
    if (hStream == 0)
        hStream = Bass.BASS_StreamCreateFile(file, 0, 0, 0);
}

When I load a URL like this, it works well:
http://lounge-office.rautemusik.fm

But when I load a URL like this, hStream is 0 and I get the error code BASS_ERROR_HANDLE:
http://somafm.com/secretagent.pls

What should I do?

MB_SOFT

  • Posts: 496
didi you enabled BASS_CONFIG_NET_PLAYLIST ?

adrenl

  • Posts: 5
didi you enabled BASS_CONFIG_NET_PLAYLIST ?

It's working, thank you!