Author Topic: BASS for Universal Windows Platform (UWP)  (Read 118053 times)

MARCOVLESMES

  • Guest
Re: BASS for Universal Windows Platform (UWP)
« Reply #250 on: 4 Jan '21 - 16:10 »
Hi I'm try to use BASSEnc in a UWP app but when I try to get the library version I'm getting an Access Violation error my code is:
Code: [Select]
public async Task<int> GetBassEncVersion()
{
     int version = -1;
     Task.Run(() =>
     {
          version = BassEnc.BASS_Encode_GetVersion();
     }).Wait();

     return version;
}
The error is:
Code: [Select]
The program '[22396] MyApp.exe' has exited with code -1073741819 (0xc0000005) 'Access violation'.
Can you guide me to the right direction? Thanks!

Ian @ un4seen

  • Administrator
  • Posts: 23656
Re: BASS for Universal Windows Platform (UWP)
« Reply #251 on: 4 Jan '21 - 17:44 »
Unfortunately, a UWP version of the BASSenc add-on isn't currently available (I guess you're trying to use the Win32 BASSENC.DLL?). The BASSenc add-on has a lot of platform-specific stuff, and UWP is unlike any of the existing supported platforms, so a port isn't straightforward.

Are you sure your app needs to be UWP? Perhaps it could be a regular "desktop" Windows app instead?

Andy09

  • Posts: 32
Re: BASS for Universal Windows Platform (UWP)
« Reply #252 on: 27 Feb '21 - 15:40 »
Hi,

i have the following error: System.PlatformNotSupportedException: Marshalling arbitrary types is not supported.

First of all, i have called this:
_ReverbHandle = Bass.BASS_ChannelSetFX(_BassExInstance.Handle, BASSFXType.BASS_FX_DX8_REVERB, 1);

This works, and the effect is starting (i can hear this).
But if i call in the next line this:
Bass.BASS_FXSetParameters(_ReverbHandle, r);

then comes the error.

My enviroment: Visual Studio 2019, UWP App with .NET Standard Library and BASS.NET for Standard.

Andy

radio42

  • Posts: 4718
Re: BASS for Universal Windows Platform (UWP)
« Reply #253 on: 28 Feb '21 - 14:05 »
This is unfortunately not supported at runtime...due to the fact, in .Net Standard not all operations are supported, as 'Marshalling arbitrary types is not supported'.
So in order to remove that function (as it is supported in .Net Framework), I left it like it is.

Andy09

  • Posts: 32
Re: BASS for Universal Windows Platform (UWP)
« Reply #254 on: 28 Feb '21 - 14:33 »
This is unfortunately not supported at runtime...due to the fact, in .Net Standard not all operations are supported, as 'Marshalling arbitrary types is not supported'.
So in order to remove that function (as it is supported in .Net Framework), I left it like it is.

Hi,
please do not get this wrong, but i guess this is not a problem with the runtime. I think is a problem with Bass.Net.Dll for .Net Standard. I have tested with Bass.Net.WinStore.dll and i have no issues with BASS_FXSetParameters and can set reverb parameters in my same library project (for .Net Standard 2.0).
And if i go back to Bass.Net.Dll (for Standard) i receive the error. And i wondering me, why works with Bass.Net.WinStore.dll and not with Bass.Net (Standard) in the same project? :-)

Andy