Author Topic: iOS native *.pls and *.m3u playing  (Read 65 times)

ivanpetrov16130

  • Posts: 2
iOS native *.pls and *.m3u playing
« on: 13 Jun '17 - 09:18 »
Hello!

I'm maintaining iOS native app, which allows to play internet radio stations. I use the BASS, last version.
The problem is some radio stations aren't played. Their URLs have M3U and PLS extensions(http://www.radiostationXXX.com/live.pls, http://meta.radiostationYYY.ru/r/r2.m3u).
In case of "radiostationXXX" I get BASS error code 2(can't open the file), and "radiostationYYY" turns into BASS error code 41(unsupported file format).
I don't get why this is happening, because Android version of app(which uses BASS too) plays those radio stations pretty well.
I tried to google, but it seems iOS BASS should support both *.m3u and *.pls.
I have no idea where to start research, any suggestions would be appreciated.

Thank you!

P.S.
I use BASS_STREAM_BLOCK, BASS_STREAM_STATUS, BASS_STREAM_AUTOFREE flags in BASS_StreamCreateURL(...).
Oh, and most of stations are playing successfully.

Ian @ un4seen

  • Administrator
  • Posts: 20063
Re: iOS native *.pls and *.m3u playing
« Reply #1 on: 13 Jun '17 - 16:23 »
BASS_StreamCreateURL does support M3U and PLS files when the BASS_CONFIG_NET_PLAYLIST option is enabled (via BASS_SetConfig). If you are enabling that and still having a problem, please give the affected URLs to investigate what's happening with them.

ivanpetrov16130

  • Posts: 2
Re: iOS native *.pls and *.m3u playing
« Reply #2 on: 14 Jun '17 - 15:53 »
BASS_StreamCreateURL does support M3U and PLS files when the BASS_CONFIG_NET_PLAYLIST option is enabled (via BASS_SetConfig).

Yes, it's enabled.

Those links:
http://www.radioeins.de/live.pls error code 2
http://metafiles.gl-systemhaus.de/hr/hr2_2.m3u error code 41
http://metafiles.gl-systemhaus.de/hr/hr1_2.m3u error code 41

I've checked them out via AIMP and iTunes - they are OK.
I could show my code, if needed.

Ian @ un4seen

  • Administrator
  • Posts: 20063
Re: iOS native *.pls and *.m3u playing
« Reply #3 on: 14 Jun '17 - 17:03 »
All 3 of those URLs are working fine when I try them on iOS here, so that's strange. Do you have the problem with them all the time or does it only happen sometimes? Please try checking the response headers by using the BASS_STREAM_STATUS flag and providing a DOWNLOADPROC in your BASS_StreamCreateURL call, something like this:

Code: [Select]
stream=BASS_StreamCreateURL(url, 0, BASS_STREAM_STATUS, DownloadProc, NULL);

...

void DownloadProc(const void *buffer, DWORD length, void *user)
{
if (buffer && !length) {
// log the HTTP/ICY headers in "buffer"
}
}