Author Topic: BASS for Windows Store (UWP)  (Read 97758 times)

Ian @ un4seen

  • Administrator
  • Posts: 22250
Re: BASS for Windows Store/Phone
« Reply #225 on: 13 Mar '19 - 14:15 »
The WinStore version of the BASSHLS 2.4.2 release is up now in the 1st post.

Pavan Tiwari

  • Guest
Re: BASS for Windows Store/Phone
« Reply #226 on: 14 May '19 - 19:26 »
Hi Ian,

Un4seen.Bass.AddOn.HLS namespace is not available in WinStore library (Bass.Net.WinStore.dll)

Ian @ un4seen

  • Administrator
  • Posts: 22250
Re: BASS for Windows Store/Phone
« Reply #227 on: 15 May '19 - 12:54 »
The issue is (or at least was last I heard) that Microsoft require all libraries that are referenced to be included in a submitted app, even if the libraries aren't actually used. So the WinStore BASS.Net version doesn't reference any add-on that can be used via the plugin system (BASS_PluginLoad), which includes the BASSHLS add-on. BASS.Net does still include those add-ons' flag/tag/etc definitions, just not the functions.

Karl Lai

  • Guest
Re: BASS for Windows Store/Phone
« Reply #228 on: 29 Oct '19 - 23:24 »
Hi, recently we have found a file that we cannot play with our app, which uses Bass.Net.WinStore.dll. The audio is an aac file. Questions:
1. Does BASS support aac on Windows 10?
2. If it does, can you help us figure out why we cannot play the file? The file is from an Alexa skill from Yahoo weather news, and I put it on my one drive:
https://1drv.ms/u/s!AnZQvguMsHKMjW7_U4NlGFq6NBTu

Thank you very much!

Ian @ un4seen

  • Administrator
  • Posts: 22250
Re: BASS for Windows Store/Phone
« Reply #229 on: 30 Oct '19 - 15:26 »
BASS can make use of the AAC decoder that comes with Windows 10, so your example file should be playable. Are you having the problem with only that AAC file or all AAC files? Are other file formats (eg. WAV or MP3) playing OK?

Karl Lai

  • Guest
Re: BASS for Windows Store/Phone
« Reply #230 on: 30 Oct '19 - 16:54 »
It's just this file from Yahoo, but the same file can be played by other software like browser or windows media player. Our app can play other type without issue, so we are wondering if there is some special setting for this file that BASS cannot accept. We also tried to play it from the original URL and it's the same result.

Ian @ un4seen

  • Administrator
  • Posts: 22250
Re: BASS for Windows Store/Phone
« Reply #231 on: 30 Oct '19 - 17:42 »
Are you only having the problem with WinStore BASS version? If you haven't already done so, please try the Win32 version too (eg. one of the pre-compiled examples in the C\BIN folder) and see if that works.

laishiekai

  • Posts: 3
Re: BASS for Windows Store/Phone
« Reply #232 on: 30 Oct '19 - 21:56 »
Thanks for the quick reply. This is Karl Lai and I registered an account to continue this discussion.

I tired the win32 sample project and it works for my file. I will look into the example codes to see what we are missing. In our code, we use BASS_StreamCreateFileUser for this file because we stream it from the service, maybe this is the root cause? Maybe I should use BASS_StreamCreateFile?

Update: I found that we can read other aac file with BASS_StreamCreateFileUser. And I also found that the bad file somehow doesn't hit end of stream. This might be why BASS return BASS_ERROR_FORMAT as error. But why BASS_StreamCreateFile (from the win32 example) can play it without issue?
« Last Edit: 31 Oct '19 - 05:23 by laishiekai »

laishiekai

  • Posts: 3
Re: BASS for Windows Store/Phone
« Reply #233 on: 31 Oct '19 - 07:04 »
This is the length that passed into the PROC function for the bad file:
512, 1536, 2048, 2048, 2048, 8192, 49152, 196608, 262144, 524288
Comparing to the working one, the first few chunks seems to be the metadata or header. But then after that it looks like the PROC function stopped before loading the full length. I am not familiar how AAC format manage the chunks, does it really have a bad format, or it's just we are not using the right flags for this format?

Our call is like this: (works for most of the file except the one above)
Bass.BASS_StreamCreateFileUser(BASSStreamSystem.STREAMFILE_BUFFER, BASSFlag.BASS_STREAM_AUTOFREE | BASSFlag.BASS_STREAM_BLOCK, STREAM_CALLBACKS, initializeStreamReadDataCallbackPointer);

Ian @ un4seen

  • Administrator
  • Posts: 22250
Re: BASS for Windows Store/Phone
« Reply #234 on: 31 Oct '19 - 16:28 »
I see what the problem is now. The file is actually an MP4 file and its "mdat" atom comes before its "moov" atom (basically the audio data comes before the description of it), which means it isn't streamable. It will be playable with BASS_StreamCreateFile or BASS_StreamCreateFileUser with system=STREAMFILE_NOBUFFER, but not BASS_StreamCreateURL or BASS_StreamCreateFileUser with system=STREAMFILE_BUFFER.

If you need to be able to stream that particular file, you can use MP4Box to fix it, like this: mp4box -isma <filename>

laishiekai

  • Posts: 3
Re: BASS for Windows Store/Phone
« Reply #235 on: 31 Oct '19 - 17:07 »
I see what the problem is now. The file is actually an MP4 file and its "mdat" atom comes before its "moov" atom (basically the audio data comes before the description of it), which means it isn't streamable. It will be playable with BASS_StreamCreateFile or BASS_StreamCreateFileUser with system=STREAMFILE_NOBUFFER, but not BASS_StreamCreateURL or BASS_StreamCreateFileUser with system=STREAMFILE_BUFFER.

If you need to be able to stream that particular file, you can use MP4Box to fix it, like this: mp4box -isma <filename>

Thank you very much for looking into this!!

Ian @ un4seen

  • Administrator
  • Posts: 22250
Re: BASS for Windows Store (UWP)
« Reply #236 on: 18 Dec '19 - 13:50 »
The WinStore version of the BASS 2.4.15 release is up now in the 1st post. Note support for Windows Phone 8 has been removed (it was dropped by Microsoft a while ago).