Author Topic: BASS_SetConfig(BASS_CONFIG_NET_PLAYLIST, 1) played only first file  (Read 54 times)

sebae

  • Posts: 2
I don't know why play only first line of M3U, PLS music.

Code
--------------------------------------------------------
if BASS_Init(-1, 44100, 0, Handle, nil) = false then
  BASS_SetConfig(BASS_CONFIG_NET_PLAYLIST, 1);
end;

Stream :=  BASS_StreamCreateURL(PWideChar(AnsiString(URL)),  0, BASS_STREAM_BLOCK or BASS_STREAM_STATUS or BASS_STREAM_AUTOFREE, @StatusProc, 0);

BASS_ChannelPlay(Stream, False);


M3U
------------------------------------------------------------------
#EXTM3U
#EXTINF:152,Armin Van Buuren feat. Justine Suissa - Burned With Desire (Chill Out Mix)
http://localhost/mp3/1.mp3
#EXTINF:204,Armin van Buuren feat. James Newman - Therapy (Sebastian Davidson Remix)
http://localhost/mp3/2.mp3
#EXTINF:231,Armin van Buuren feat. Fiora - Waiting For The Night (Rodg Chill Mix)
http://localhost/mp3/3.mp3

Please let me know if someone knows this probelm


Ian @ un4seen

  • Administrator
  • Posts: 23404
BASS_StreamCreateURL creates a single stream, so it isn't really feasible for it to play multiple playlist entries. When the BASS_CONFIG_NET_PLAYLIST option is enabled, it will play the first playable URL that it finds in a playlist (it will try a 2nd/3rd/etc URL if the 1st URL fails). If you would like to play all of the playlist entries then you would need to parse the playlist yourself and pass each of the entries (instead of the playlist) to BASS.

sebae

  • Posts: 2
Thank Ian.

Your comment is really helpful.