BASS for Universal Windows Platform (UWP)

Started by Ian @ un4seen, 30 Jul '15 - 16:42


Jfarro

with that build I get:

An exception of type 'System.EntryPointNotFoundException' occurred in Bass.Net.WinStore.dll but was not handled in user code

Additional information: Unable to find an entry point named 'BASS_GetCPU_' in DLL 'bass'.

I tried getting the latest Bass (24?) and updating the dlls that get copied locally with my app, but that didn't seem to help...do I need to update somewhere else that I'm missing?

radio42

I need to validate this with Ian - it looks those extra functions for the PocketPC verison are now missing within BASS?!

radio42

Sorry for the confusion, there was a bit of a misunderstandingbetween me and Ian and all his great versions ;-)

So here comes a new verison:
  www.un4seen.com/filez/4/Bass.Net.WinStore.zip

Jfarro

No worries, appreciate the quick responses.  That worked! Thanks, loving this library

Jfarro

Couple of questions for this library:

1) Is there a way to 'output' a stream to a file? I don't see BassEnc in the namespaces...wasn't sure if I'm missing the API for this, if it's possible, or if BassEnc would be needed (and if so, is that portable?)

2) I'm trying to find a way to access the instrument data for Music (mod/xm) files.  Which API should I be looking at for that?

Thanks in advance

Ian @ un4seen

Quote from: Jfarro on  2 Jun '16 - 02:251) Is there a way to 'output' a stream to a file? I don't see BassEnc in the namespaces...wasn't sure if I'm missing the API for this, if it's possible, or if BassEnc would be needed (and if so, is that portable?)

A Windows Store version of the BASSenc add-on isn't currently available, but the way BASSenc works is it sets a DSP function on the stream (via BASS_ChannelSetDSP) and then writes/encodes the data received by that. You could do the same sort of thing yourself, eg. open a file and write a WAV header to it, then set the DSP function on the stream to write the sample data, and finally update the length info in the header when you've finished writing. You could have a look at the WRITEWAV and RECTEST examples that are included in the Win32/Linux/OSX BASS packages as they are doing similar things.

Quote from: Jfarro on  2 Jun '16 - 02:252) I'm trying to find a way to access the instrument data for Music (mod/xm) files.  Which API should I be looking at for that?

By "data", do you just mean the instrument names/text? If so, that is available via the BASS_TAG_MUSIC_INST BASS_ChannelGetTags option. For example, something like this:

for (int a=0; ; a++) {
const char *inst=BASS_ChannelGetTags(handle, BASS_TAG_MUSIC_INST+a);
if (!inst) break;
printf("inst %d = %s\n", a+1, inst);
}

Jfarro

For the Mod data, what I'm looking for is what XMPlay shows when you select the "Mod Pattern Display" visualization.  This reminds me of what I used to see on Screamtracker back in the day, and is what I'm trying to replicate for my app.  I saw the instrument data come back from the APIs you mentioned...is the Mod pattern display data different?

Ian @ un4seen

Oh, right. I'm afraid BASS doesn't currently make the pattern data available. What you could do is use another library to load the pattern data, and then sync the display of that to the BASS_POS_MUSIC_ORDER position.

SFX_Bass

So if I'm right, it's not possible to use BASS_FX or BASSENC in Windows Store apps?  Recently demoed a project and a Windows Store version was requested as well, and my project relies on those two libraries as well.  I couldn't even write out a WAV file from an app in that case, right?  Is that a limitation of being an app?

Ian @ un4seen

I think the BASS_FX add-on should be fairly straightforward to port to Windows Store as it does not contain much platform-specific stuff, but the BASSenc add-on will be more complicated as a lot of it is platform-specific. If you only need BASSenc for WAV writing, then perhaps you could implement that yourself? You could set a DSP function on the source channel (via BASS_ChanelSetDSP) and then write the data to file in there. Or if the source is a "decoding channel" (using BASS_STREAM_DECODE), then you could just write the data that you receive from BASS_ChannelGetData to file.

SFX_Bass

Ah, awesome!  I could try to write the file encoding functionality myself, definitely.  Is a BASS_FX port something that is planned, then?  Or is it just something that should be simple to do?

Ian @ un4seen

I will check with the BASS_FX developer regarding a Windows Store port.

cablehead

#138
Winstore apps have several ways to record and output to almost any file type built in. Very easy.

These Windows functions do not work in a backgroundtask however. Its seems, tho that Bass is able to Init the micophone and start recording in a backgroundaudiotask. I have one working and sending bytes written to the output window, appears to be recording -  minimized/switched - but I have no way to write the .wav (yet) to prove it. And I still cannot get bass.dll onto a UWP10 phone...

(: JOBnik! :)

#139
Hi ;D

BASS_FX for Windows Store/Phone is ready:
http://www.jobnik.net/BASS_FX/bass_fx24-winstore.zip

radio42

I'll add that to the Bass.Net version as soon as I return from my vacation, which is at the end of the month.

cablehead

Radio, don't forget a waveWriter and PeakLevel method. Lol.

radio42

As already explained I cannot add those functions, as they use .Net methods which do not exist in the limited windows store version of the CLR.
As such there is currently not way to simply port them.
It might be painful for you but I guess you need to blame Microsoft for its strange way of restrictions with different OS versions and .Net.


Update

Hello Ian,

I downloaded last update Aug.19th but no change in our svn server for win10 files. Did you update them as well?

Thanks, Marek.

Ian @ un4seen

The 19/8 update only added an updated BASS.H file (for the BASS_DEVICE_LOOPBACK definition).

Blink123123

Any updates on the Bass_FX for UWP? it is not included yet in the Bass.Net.

Ian @ un4seen

The WinStore BASS.Net update including support for BASS_FX is now up in the 1st post.

BassPassion

Hi,

are there really no plans for a Windows Store versions of BASSEnc ?
I have a desktop app that I would love to port this to Xamarin and to UWP, this app relies heavily on the BASSEnc functionality.

There are BASSEnc versions for Android, iOS (thus enabling Xamarin versions) and Win32 so I would really, really love to have Windows Store (UWP) versions (x86/x64/Arm).
Please, please with sugar on top ! )))

Ian @ un4seen

A Windows Store version of BASSenc probably will be available eventually, but I'm afraid there are no immediate plans for it. BASSenc is the most platform-specific of the multi-platform add-ons, and the required Windows Store APIs are very different to other platforms, so it'll be quite a big task to port.