BASS for Universal Windows Platform (UWP)

Started by Ian @ un4seen,

theweavr

First of all, thank you so much for porting BASS to Windows Store.

I just wanted to report this issue I was having with background audio. Whenever the app goes into background the audio starts stuttering and jumping. But as soon as the app comes back into foreground the audio becomes smooth. I tested this on emulator (2 GB RAM) and on a friend's phone.

I am using UWP API version 14393.

Once again, thanks a lot!

Ian @ un4seen

It may be that the app isn't getting enough CPU when in the background, resulting in BASS struggling to keep the output refreshed quickly enough. You could try raising the device buffer length and see if that helps. Please see the BASS_CONFIG_DEV_BUFFER documentation for details. The default in the Windows Store version is 30ms, so you could try 40ms, then 50ms, etc. Note that changes need to be made before calling BASS_Init.

theweavr

I think the problem is with some CPU limit being placed on the app.

I used BASS_GetCPU saw these values:
4.27026844024658 on the foreground.
0.651543200016022 on the background.

ulrobin

I'm a quite young developer and I've worked with Bass.Net in VB.net for about two years...

Some weeks ago I decided to code a new project, but this time as UWP-App in Windows 10 to support Microsofts app diversity and having less work for more devices.

To start with UWP-app-development I've read many articles about WASAPI, etc., so - in general - the native audio APIs.


Due to a lack of pitching possibility, I've decided to try Bass.Net in UWP, but this try fails for about 5 days now... :-/

So my question is, if it would be possible to upload (or send by PM) a Visual-Studio-solution with all for Win10 and every platform neccesary files included...


It would be great, if this would be possible, because elsewise I'm getting crazy  ???

radio42

I am afraid, there is currently no Universal App Bass/Bass.Net lib available!

ulrobin

And using an older version from Win8.1 (phone) libraries won't work, too?! :-/

radio42

I am afraid a new BASS version would also be needed...

Ian @ un4seen

Unless I'm misunderstanding the question, it should be possible to use the WinStore BASS version in universal apps? The tricky/fiddly part is setting up the project to use the correct BASS.DLL version for each platform. There are some instructions for doing that here:

   www.un4seen.com/forum/?topic=16665.msg117870#msg117870

BassPassion

Hi Ian,

I am trying to play .ASX streams with the WinStore version, but no luck.
For example: http://www.twr.org.uk/twr/transworld.asx

Calling the StreamCreateUrl with the same flags: BASSFlag.BASS_STREAM_STATUS | BASSFlag.BASS_SAMPLE_FLOAT | BASSFlag.BASS_STREAM_DECODE
returns 0 on WinStore, with LastError being "FileFormat".

Works fine on Win32.

Isn't .ASX supported on the WinStore platform?

Ian @ un4seen

No, I don't think ASX files are currently supported on the Windows Store platform. On regular Windows, support for ASX is added by the BASSWMA add-on. With the advent of Media Foundation codecs (including WMA), the ASX support should probably be moved to BASS itself. I will look into that (on both Windows Store and regular Windows).

Ian @ un4seen

The Windows Store version of the BASSMIDI 2.4.10 release is now up in the 1st post. Windows Store versions of the BASSDSD and BASS_APE add-ons have also been added.

Ian @ un4seen

A Windows Store version of the BASSWV add-on has now been added to the 1st post.

Ian @ un4seen

A Windows Store version of the BASS_TTA add-on has now been added to the 1st post.

sakya

#163
I made a test application using BASS to play audio in a background task for Windows Store.
The full source code can be downloaded here:
https://www.sakya.it/wordpress/?p=720

Btw: many thanks for the Store version, it seems to work great! ;)

Ian @ un4seen

The Windows Store version of the BASSMIDI 2.4.11 release is now up in the 1st post.

cablehead

#165
Awesome job Sakya!

I've Been looking for a way to turn bass into a "real" IMediaSource to keep MediaPlayer "busy"...so it plays in background for a single process recorder. I'm sure you know there is a new way to have a background player without a background task (single process) (Aniv SDK) for Windows 10.

Anyway you could post a recording version to IMediaSource? Again, awesome code.

*Your code should somehow makes it's way into Bass.Net Winstore.
Bass.Net.CreateIMediaSource(MediaPlayer);

sakya

Quote from: cableheadAnyway you could post a recording version to IMediaSource? Again, awesome code.
Thanks, do you want to record audio from the mic? Or you want to record the audio played from the background player?

cablehead

What I really want is a loopback recorder (and mic eventually, lol). Which I do have working in background...but I fool MediaPlayer with a silent looping wav...beacause I don't have a real IMediasource.

Ulysses

It seems that BassFX for winstore download link is down...

Ian @ un4seen

The WinStore version of the BASSHLS add-on is now included in the 1st post.

BassPassion

Ian, any progress or updates regarding BassEnc for UWP?


theweavr

@Ian Any chance for a BASS_AAC plugin for Windows Store?

Ian @ un4seen

AAC/MP4 is already supported by BASS via Media Foundation on Windows Store, so there is no real need for the BASS_AAC add-on there.

cablehead

Ian,  Anything new and exciting in the Winstore bass update of Oct 4?