Author Topic: Webradio-Stream stops after a few seconds  (Read 344 times)


  • Posts: 9
Webradio-Stream stops after a few seconds
« on: 25 Jul '17 - 18:45 »
I have a problem with a specifc webradio stream I want to play. The stream starts just as every other stream starts, but it plays only a few seconds, up to one minute maybe. It can be restarted, until it stops again after a few moments. Other streams are working fine.

The code in Delphi is (after the bass initialization) with the specific stream is
Code: [Select]
var MainStream: DWORD;
// ...
    MainStream := BASS_StreamCreateURL(PChar(''), 0, BASS_UNICODE , Nil, Nil);
    // in Delphi 20009 PCHAR is Unicode-Char, 2 Bytes per character => BASS_UNICODE
    BASS_ChannelPlay(MainStream , False);

In other players (VLC, Winamp, XMPlay) the stream seems to work properly.

Any idea how to fix this issue? Or any ideas how to debug this? I tried to increase some parameters like
Code: [Select]
but this had no effect.

edit: In the netradio example it is also not working...
« Last Edit: 25 Jul '17 - 18:55 by Gausi »

Ian @ un4seen

  • Administrator
  • Posts: 21382
Re: Webradio-Stream stops after a few seconds
« Reply #1 on: 26 Jul '17 - 14:00 »
It could be that they are blocking BASS because they suspect it's a stream ripper. If so, you can try changing the "User-Agent" value via the BASS_CONFIG_NET_AGENT option to avoid that, something like this:

Code: [Select]
BASS_SetConfigPtr(BASS_CONFIG_NET_AGENT or BASS_UNICODE, PChar('myapp/1.0'));


  • Posts: 9
Re: Webradio-Stream stops after a few seconds
« Reply #2 on: 26 Jul '17 - 16:42 »
This seems to work, and the explanation is plausible. Many thanks.  :)