BASS.NET API 2.4.18.2

Started by radio42,

DividedSE

As .net framework is almost dead with VS2022.. .will there be any update (last updatew in 2019) for .net 5/6 optimising with c# 9/10... & Support for waveform & visuals with Systems.Drawing.Common(which is crossplatform) now widely used from Microsoft Nuget as microsoft pushing for it itself.
I myself used it bass.net.dll in .net5 wpf app with system.drawing.common by microsoft & it successfully works on waveform & visuals. So if it works please add official support of it.

radio42

Hi DividedSE,

there is already support for .Net core in Bass.Net. But I am not sure, if I will add support to the .Net code version for the WaveForm and Visuals.
The current implementation of the the WaveForm and Visuals are indeed targeted for the .Net framework, but also only additions on top for fun.

So maybe the current idea is to provide that as open source to the public, so everyone who wants can use that and convert as wanted - but that is my current idea only, I am still not sure about it.
But would you like to support that idea and add your stuff as well to the public?

serkanp

hi 
i am using dotnet standart version of your wrapper and that is working in linux, macos , windows.  (i am using it with unity also)
i have a problem with lame EncoderCommandLine..
it always sets  "lame.exe"
but on linux or macos, installed lame is not named as lame.exe..
it is where it is and the name is just lame, and you can call it system-wide..
so how can we override/change lame.exe name on EncoderCommandLine ?

serkanp

Quote from: serkanphi 
i am using dotnet standart version of your wrapper and that is working in linux, macos , windows.  (i am using it with unity also)
i have a problem with lame EncoderCommandLine..
it always sets  "lame.exe"
but on linux or macos, installed lame is not named as lame.exe..
it is where it is and the name is just lame, and you can call it system-wide..
so how can we override/change lame.exe name on EncoderCommandLine ?


when F12 on EncoderLame on visual studio2022, it decompiles and your sourcecode seems hardcoded lame.exe
private string BuildEncoderCommandLine()
        {
            CultureInfo provider = new CultureInfo("en-US", useUserOverride: false);
            StringBuilder stringBuilder = new StringBuilder();
            if (!string.IsNullOrEmpty(base.EncoderDirectory))
            {
                stringBuilder.Append("\"" + Path.Combine(base.EncoderDirectory, "lame.exe") + "\"");
            }
            else
            {
                stringBuilder.Append("lame.exe");
            }
.
.
.
}

you must put an option to change lame.exe name... :)

Ian @ un4seen

Instead of using a separate LAME executable, you could use the BASSenc_MP3 add-on. It supports most common LAME options (please see the documentation for a full list).

serkanp

Quote from: Ian @ un4seenInstead of using a separate LAME executable, you could use the BASSenc_MP3 add-on. It supports most common LAME options (please see the documentation for a full list).

thanks for the reply Ian.. thats what i am exactly looking for..
it seems that it can work on ios and android..

ps: radio42 made an excellent wrapper for the encoders.. i was using and implementing his features.. but, i have to implement native bass features instead of his encoder wrappers..

cheers..

vassilis

Hi,
I'm trying to set the following FX:

var envFxHandle = Bass.BASS_ChannelSetFX(track.StreamHandle, BASSFXType.BASS_FX_BFX_VOLUME_ENV, 0);

BASS_BFX_ENV_NODE[] nodes =
{
  new BASS_BFX_ENV_NODE(0, 0f),
  new BASS_BFX_ENV_NODE(track.CuePoints.Start.Value + track.CuePoints.FadeIn, 1f),
};

Bass.BASS_FXSetParameters(envFxHandle, new BASS_BFX_VOLUME_ENV(nodes));

It throws the following exception::

System.Runtime.InteropServices.COMException: 'Typelib export: Type library is not registered. (0x80131165)'
Any help? This drives me crazy for hours.

[Framework: .NET 6, Windows]

radio42

The BASS_BFX_VOLUME_ENV class exists in the BASS_FX add-on.
So you need to load that beforehand - did you do that?
I.e. did you call BassFx.BASS_FX_GetVersion();  ? This will load the BassFx add-on automatically...

vassilis

It was one of the first things I tried but unfortunately the problem remains.

vassilis

Any help? I really got stuck here. Do you suspect it is specific to .NET Core?

Guest

load Bass FX if your want use it in your Project from add-ons Site here
and put it to your Exe path.

Bello

Quote from: radio42So maybe the current idea is to provide that as open source to the public, so everyone who wants can use that and convert as wanted - but that is my current idea only, I am still not sure about it.

That might be a good option!
My application is currently on 4.8 but we'll have to move to 6, 7, ... at some point.

radio42

#1572
11.10.2022: Version 2.4.17.0 is out!

Finally a full update after a long time...

Note:
        - Added support for .Net 6.0 (core)
        - Added support for .Net 4.8 (full)
        - Removed all other platform specific builds (no need anymore, so its time to update)
        - BASS: added support for v2.4.17.0
        - add-ons: all latest versions!

Other fundamental changes:
The used .Net Frameworks are now only the Full and the Core versions, which makes deployment and configuration much more easy.
The Encoder and Broadcasting Framework now supports all BASSenc_XXX add-ons.
iOS now uses dynamic linking (instead of static), just like any other platform, so make sure to always also update to all latest native BASS, plug-in and add-on versions!

core: .Net 6.0 fully supports platform independent development for Windows, Linux, macOS, Android or iOS - no other extra version/build is needed.
         The only limitation with this version is, that any Drawing or Image specific classes or functions have been excluded, like the Visual and WaveForm.

full: uses the .Net 4.8 full framework to target Windows development including any Drawing or Image specific classes or functions.


Full Install:
 www.un4seen.com/filez/4/Bass24.Net.zip

poqut

#1573
Quote from: radio4211.10.2022: Version 2.4.17.0 is out!

Hey,

I've just updated to 2.4.17 for my .Net 6 WPF project.

I was putting bass and addons dlls to a folder and using them via LoadMe() and BASS_PluginLoadDirectory() methods.

Now it says "Bass does not contain a definition for LoadMe" and also for others there is same error.  BASS_PluginLoadDirectory() still exists though.

Is LoadMe removed or replaced with something?

radio42

These methods do still exist for the FullFramework version, as the LoadMe() and BASS_PluginLoadDirectory() methods do use native Windows functions.

These however do not exist for the platform independent .Net core version - I assume you are using the .Net core version of Bass.Net?!

poqut

Yes, my project is .Net 6.0 WPF project, so I was using core version of previous bass.net too.

Anyways, I reverted back to previous bass.net for now since I had some issues with BASS_Mixer_ChannelSetPosition too.

I will try again in the future when I have enough time and report back if I have any issues.

Thank you.

radio42

Sorry, but the previous .Net core version also had the same limitation.
I guess you used the regular Bass.Net version (which is the same as the full framework version) even in the previous version, which for WPF you can still perfectly use. As such, no need to go back...

poqut

I'm currently using Bass.Net 2.4.14.1 from core folder which has 501kb filesize.

It has both methods and they work well, I can load dlls from a subfolder.

I will try soon but you mean that I can use Bass.Net 2.4.17 from full directory in the zip with .Net 6.0?

Since my project is .Net 6.0, I was thinking that I have to use core version.

radio42

No, then you have used them, but they actually only work on Windows and have actually be present by accident.

The full version uses the .Net version 4.8 (and not 6.0 core) - but if you only target Windows with WPF, you might use that version.

If you target .Net 6.0 core, you must use the core version and this doesn't support LoadMe etc. anymore, as these are not platform independent and only support Windows.

poqut

I'm currently on WPF but soon I will move to crossplatform world via MAUI, that's why I'm targeting .Net 6.0 to make transition easier a bit.

So, today I've tried 2.4.17 again and gave up on all LoadMe() calls.

Supported formats are ok but for FLAC I had to use BASS_FLAC_StreamCreateFile, because I had issues (setposition and getlength) with BASS_StreamCreateFile.

After a while I saw that BASS_PluginLoad method and applied it like BASS_PluginLoad("bassflac"). After that I can be able to use BASS_StreamCreateFile without any issues.

Am I doing something wrong or is it mandatory -for other platforms too- to use BASS_PluginLoad even if the bassflac plugin file is at the same place?