Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Anybody have BASS.NET working with Unity 5?

Discussion in 'Audio & Video' started by elbows, Mar 17, 2015.

  1. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    I'm not exactly expecting a flood of replies but thought I'd ask on the off chance anyway.

    I never tried to get BASS & BASS.NET working with older versions of Unity, so I am at a disadvantage trying to get it working in 5.

    As a starting point I thought I would try the following example that someone generously shared for Unity 4:

    http://hellomeow.net/unity-mp3-importer/

    But no matter which version of the BASS dll's I use, where I put them, and no matter the platform options I select for the dlls inside unity, I just get a bass.dll not found error. Any ideas?

    My attempts were in the editor only, 64 bit, on Windows 8.1. I guess I will attempt to try with the 32 bit unity editor out of desperation and to rule something out.
     
  2. HelloMeow

    HelloMeow

    Joined:
    May 11, 2014
    Posts:
    281
    You have to use the 64bit dlls with the 64bit editor. Just put bass.dll in "Unity 5\Editor" and bass.net.dll in your assets folder.

    I use the one from bass24.zip\x64\mp3-free. It uses the OS's mp3 decoder, so you won't have to mess with any mp3 licensing.
     
    elbows likes this.
  3. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Thanks for your invaluable knowledge-sharing. I've not tried it yet but I think my problem was due to a simple mistake when reading the instructions - I was putting the dll in a folder called Editor inside my project, not the folder where the unity editor lives, oops!

    As for mp3 issues, I'm actually using your code as a starting point, my actual aim involves WASAPI loopback!
     
  4. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    It's alive, it's alive!

    Thanks again :)
     
  5. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    And now fft data from WASAPI loopback is coming in :)

    Ahh what a relief, I tried to do this years ago using naudio but there is a problem getting WASAPI working inside Unity using that library.