Author Topic: Bass in .net core app  (Read 738 times)

ludwich

  • Guest
Bass in .net core app
« on: 1 Oct '16 - 09:16 »
I cant even get this in the using statement after installed in nuget. Is it possible to use in core ?
using un4seen.bass; is only red for me =(

plz help

MathewSachin

  • Posts: 18
Re: Bass in .net core app
« Reply #1 on: 2 Oct '16 - 05:13 »
Are you using ManagedBass?

Then try using ManagedBass;

radio42

  • Posts: 4612
Re: Bass in .net core app
« Reply #2 on: 2 Oct '16 - 10:06 »
Or try using BASS.NET, as explained here:
http://www.bass.radio42.com/help/Index.html

ludwich

  • Guest
Re: Bass in .net core app
« Reply #3 on: 3 Oct '16 - 07:07 »
I have been trying ManagedBass but cant even get it to install from nuget correctly. i only get that it wont work on .net core 1.0. Will have to try another computer.

Thanks for the help

Ludwich

  • Guest
Re: Bass in .net core app
« Reply #4 on: 3 Oct '16 - 13:15 »
ManagedBass gives this error when installing. tried it on 2 computers now with community edition. Anyone else who have this issue?

Bass installs from nuget as it should but cant use using un4seen.Bass;

 One or more packages are incompatible with .NETCoreApp,Version=v1.0.

MathewSachin

  • Posts: 18
Re: Bass in .net core app
« Reply #5 on: 4 Oct '16 - 07:55 »
ManagedBass types exist in ManagedBass namespace and unlike Bass.Net which exist in un4seen.Bass.

Also, you have to download the native bass.dll

Try this sample code:
Code: [Select]
using System;
using ManagedBass;

namespace HelloWorld
{
    class Program
    {
        static void Main(string[] args)
        {
            // Init BASS using the default output device
            if (Bass.Init())
            {
                // Create a stream from a file
                var stream = Bass.CreateStream("FILE.mp3");

                if (stream != 0)
                    Bass.ChannelPlay(stream); // Play the stream

                // Error creating the stream
                else Console.WriteLine("Error: {0}!", Bass.LastError);

                // Wait till user presses a key
                Console.WriteLine("Press any key to exit");
                Console.ReadKey();

                // Free the stream
                Bass.StreamFree(stream);

                // Free current device.
                Bass.Free();
            }
            else Console.WriteLine("BASS could not be initialized!");
        }
    }
}

alexidsa

  • Guest
Re: Bass in .net core app
« Reply #6 on: 17 Jan '18 - 14:11 »
Are you sure BASS.NET supports .Net Core? I don't see any mention of it in the docs