BASS.NET API 2.4.18.2

Started by radio42,

radio42

I'l take a look at it again and fix that in the next version!

radio42

15.10.2018: Version 2.4.13.3 is out!

Note:
   - BASS: added support for v2.4.13.25
   - BASSWASAPI: added support for v2.4.2.1
   - BASS_FX: added support for v2.4.12.1
   - BASSenc: added support for v2.4.14.0
   - BASSenc_MP3: added support for v2.4.0.0
   - BASSenc_FLAC: added support for v2.4.1.1
   - BASSenc_OGG: added support for v2.4.0.0
   - BASSenc_OPUS: added support for v2.4.0.2
   - BASSASIO: added support for v1.3.1.9
   - BASSMIDI: added support for v2.4.11.14
   - BASSHLS: added support for 2.4.1.2
   - BASSDSD: added support for 2.4.1.2

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

Lib only:
 www.un4seen.com/filez/4/Bass24.Net_update.zip

teq

Hi! After update i still can't see BassEnc_Mp3

radio42

Sorry, I just made a rebuild, for some target's I indeed forgot to include it.
Please re-download and try again - it should now be available.

serkanp

hey radio42,
i need help on selecting correct component for dotnet core 2.x
not to enter duplicate entry, can you reply to the thread ?
http://www.un4seen.com/forum/?topic=18287.msg128549#msg128549

radio42

12.04.2019: Version 2.4.14.0 is out!

Note:
        - BASS: added support for v2.4.14.0
        - BASSMIDI: added support for v2.4.12.1

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

Lib only:
 www.un4seen.com/filez/4/Bass24.Net_update.zip

古川 正基

Where can I download 2.4.13.3?

radio42

24.09.2019: Version 2.4.14.1 is out!

Note:
        - Added support for .Net Core 2.1
        - Added support for .Net Standard 2.0

        - BASS: added support for v2.4.14.15
        - BASSWASAPI: added support for v2.4.2.3
        - BASS_FX: added support for v2.4.12.2
        - BASSenc: added support for v2.4.14.0
        - BASSASIO: added support for v1.4.0.0
        - BASSMIDI: added support for v2.4.12.4
        - BASSWEBM: added support for 2.4.0.0

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

Lib only:
 www.un4seen.com/filez/4/Bass24.Net_update.zip

Guest

Thank you so much.
I hope the next version will include BASSHLS v2.4.2.

radio42

The latest HLS Version should already be included.
Am I missing something here?

poqut

Thank you so much for .Net Core & Standard support.

I've tried both but I can't find EncoderLAME or EncoderWinampAACplus with them, is it known issue?

radio42

Yes, these are only supported in the standard .NET version.
You can use the new bassenc addons instead.
But I can take a look to add them in a next version (if possible)!

poqut

Thank you, it would be nice having them, they were making things more easy :) But for now I've managed to setup EncoderCMDLN for mp3, it works without any problem so far.

Btw Shoutcast was giving "No data is available for encoding 1252. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method" error, because .Net Core doesn't have all the encodings as .Net Framework. I've managed to install System.Text.Encoding.CodePages package and set it up on startup to register, so it's working now too. I just wanted to let you know, I have no idea where it's using 1252 but maybe it can use UTF8 instead that .Net Core have it already.

radio42

Well, SHOUTcast v1 uses the Windows-1252 code page as the default for title updates.
You might use the 'ForceUTF8TitleUpdates' property to force UTF-8.

However, I can take a look to use UTF-8 also as a default for .NET core for SHOUTcast.

radio42

Please re-download the latest version - I have modified the Broadcast classes for the .Net core and .Net standard version to include the missing Encoders (as mentioned above)!

poqut

Thanks, I've tried the updated version. It starts without any problems, I can listen the stream but after a few seconds it throws "An unhandled exception of type 'System.ExecutionEngineException' occurred in Bass.Net.dll"

I've tried to disable the notification and also ForceUTF8TitleUpdates both true and false to see if it's related but it still throws that error.

radio42

The problem may not actually be occurring in the line that throws an exception. This may just be a symptom of something that happened earlier.

The System.ExecutionEngineException exception is thrown when the CLR detects that something has gone horribly wrong. This can happen some considerable time after the problem occurred. This is because the exception is usually a result of corruption of internal data structures - the CLR discovers that something has got into a state that makes no sense. It throws an uncatchable exception because it's not safe to proceed.

So you might have some code in some completely unrelated part of the system that corrupts something, but this only becomes apparent when this particular piece of code runs.
Did you get a further or more detailed stack trace?

Unfortunately, this means you need to start casting the net a bit wider. Pretty much anything that uses either unsafe code, or COM interop is potentially suspect. This will be a long and tedious process, sadly. One way you might approach it is to try gradually simplifying the program: what's the smallest piece of code that can illustrate the problem? (E.g., if you put the code you've shown there into an application that contains nothing else except the simplest possible call to that method, does it still fail?)

poqut

Thank you for the explanation, sadly there is no more detailed info for now.

I made this separate project just to test broadcasting with Core & Standard nothing else but there are some custom classes to pass the stream info (server, port etc) & audio stuff. I will try to make it more simple and let you about the results.

Btw is there a way to use Encoder addons instead of command line encoders with Shoutcast?

radio42

Yes, you can create your own encoder classes and derive them from "BaseEncoder" and implement the details as you like...

The ready-build encoder classes all currently use the command-line encoders.

poqut

I found the issue, it was my bad that forgot to pass broadcast object so it was going to gc. Now everything works as expected without any problems.

And I made that encoder class as you said, it's just for broadcasting only and working fine so far. Can you please check if there is something I miss, I just wanted to be sure  :)

    public class EncoderMp3AddOn : BaseEncoder
    {
        public EncoderMp3AddOn(int channel) : base(channel)
        {
        }

        public override bool SupportsSTDOUT => true;

        public override BASSChannelType EncoderType => BASSChannelType.BASS_CTYPE_STREAM_MP3;

        public override string DefaultOutputExtension => ".mp3";

        public override string EncoderCommandLine => "";

        public override bool Start(ENCODEPROC proc, IntPtr user, bool paused)
        {
            var options = $"--noreplaygain -b {EffectiveBitrate}";

            var flags = BASSEncode.BASS_ENCODE_CAST_NOLIMIT | BASSEncode.BASS_ENCODE_PAUSE;

            EncoderHandle = BassEnc_Mp3.BASS_Encode_MP3_Start(ChannelHandle, options, flags, null, user);

            return EncoderHandle != 0;
        }
    }