BASS and related libraries for ARM Mac

Started by kode54,

kode54

Is there any plan to produce early alphas that include this platform for those of us attempting to produce Universal 2 binaries early?

Basically, to build for it, you need the Xcode 12 for Universal Apps beta, and if you're using the command line tools, you also need to replace the MacOSX10.16.sdk in /Library/Developer/CommandLineTools/SDKs with the one from inside the Xcode Universal beta app to build for arm64.

It needs the `-arch arm64` switch, and if you use any assembly functions, they need to be the same ABI as iOS, only using the same features as a typical macOS build.

I'll have no idea if any of this works for now anyway, as I don't have a DTK, so this is kind of a futile process.


Ian @ un4seen

#2
Here are arm64 (and x86_64) builds of the latest BASS and BASSFLAC/MIDI/OPUS/WV/MPC:

   www.un4seen.com/stuff/bass-macos-arm64.zip

Please report how you get on if you give them a try. Also let me know if you need any other add-ons.

AlexFreud

Hello!

"Universal binary" BASS version not playing FLAC and M4A files (bass error: unsupported file format) on x86 (I don't have DTK and can't test on arm)

Ian @ un4seen

A BASSFLAC build has now been added to the package above for FLAC support, but M4A files should be supported as standard by BASS (with the help of the OS's codecs). Are you having the problem with all M4A files or only specific ones? Please upload one of them to have a look at here:

   ftp.un4seen.com/incoming/

AlexFreud

Rolled back the library to the latest version from the site, FLAC and M4A play great without any plugins.

Example files uploaded to ftp (FLAC and M4A)

Ian @ un4seen

That's strange. Please confirm what macOS version you're running. Also, are those files working if you try them with this BASS build?

   www.un4seen.com/stuff/libbass.dylib

AlexFreud

Yes, with this build files working perfectly. I'm running macOS Big Sur 11.0 beta 4 (20A5343i), but i'm also tested on 10.15.6, same result.

Ian @ un4seen

Oh yes, I see CoreAudio codec support indeed isn't working on x86_64 with the build above. That's because an AudioFileOpenWithCallbacks call is returning a strange value that looks like it's failing. On closer inspection of the assembly code, the call is actually succeeding but the return value is being corrupted/overwritten. That looks like a bug in the Xcode 7.3.x compiler. Switching to 7.2.x or 8.0 stops the problem happening. Here are Xcode 8.0 rebuilds for you to try:

   www.un4seen.com/stuff/bass-macos-arm64.zip

You may be wondering why an old Xcode version is used. It is to maintain compatibility for as many users/systems as possible. Xcode 12 is needed to build for the arm64 architecture, but that can only target macOS 10.9 at the earliest for x86_64 and doesn't support i386 at all (the next BASS release will still include i386). So an earlier Xcode version needs to be used for those architectures. The current release version on the BASS webpage (and the libbass.dylib posted above) was built with Xcode 9.4.1 on macOS 10.14, but Xcode 12 requires macOS 10.15, which Xcode 9.4.1 doesn't work at all on (missing symbols). In fact, the whole Xcode 8 and 9 series (apart from 8.0) don't work on it. Apple don't make it easy to keep supporting older systems!

AlexFreud

Thank you! This build working perfectly!

Can I ask you to build x86_64/arm version of the OPUS library?

P.s. support for old osx versions is a pain...

Ian @ un4seen

Yep, a BASSOPUS build has now been added to the package above, so please redownload to get that.

kode54

Cool! I'll get right to building with this, but I won't be able to test execution, since I don't have the money to acquire test hardware, let alone the final release hardware whenever that happens.

I'll also need BASS_MPC and BASS_WV, if you can. :D

Ian @ un4seen

BASSWV and BASS_MPC builds have now been added to the package above. Let me know if any others are needed.

AlexFreud

Hello!

Can you make DSD plugin for arm and x86? Thank you!

Ian @ un4seen

As requested, a BASSDSD build has now been added to the package above.



Marek Ledvina


Ian @ un4seen

arm64 support should be added to all of the macOS packages on the BASS webpage this week.


Ian @ un4seen

The macOS libraries including arm64 support are up now on the BASS webpage, so please redownload to get that. Note i386 support is still included for compatibility with old macOS versions. If you don't want that, you can use the included makefile to remove it (type "make 64bit").

michael9504

Quote from: Ian @ un4seenOh yes, I see CoreAudio codec support indeed isn't working on x86_64 with the build above. That's because an AudioFileOpenWithCallbacks call is returning a strange value that looks like it's failing. On closer inspection of the assembly code, the call is actually succeeding but the return value is being corrupted/overwritten. That looks like a bug in the Xcode 7.3.x compiler. Switching to 7.2.x or 8.0 stops the problem happening. Here are Xcode 8.0 rebuilds for you to try:

   www.un4seen.com/stuff/bass-macos-arm64.zip

You may be wondering why an old Xcode version is used. It is to maintain compatibility for as many users/systems as possible. Xcode 12 is needed to build for the arm64 architecture, but that can only target macOS 10.9 at the earliest for x86_64 and doesn't support i386 at all (the next BASS release will still include i386). So an earlier Xcode version needs to be used for those architectures. The current release version on the BASS webpage (and the libbass.dylib posted above) was built with Xcode 9.4.1 on macOS 10.14, but Xcode 12 requires macOS 10.15, which Xcode 9.4.1 doesn't work at all on (missing symbols). In fact, the whole Xcode 8 and 9 series (apart from 8.0) don't work on it. Apple don't make it easy to keep supporting older systems!

hello,the link cannot open,it's got an 404 error!can u upload this libs?plz

Ian @ un4seen

ARM64 support is included in the macOS packages on the BASS webpage, so that separate download is no longer available/needed.

michael9504

Quote from: Ian @ un4seenARM64 support is included in the macOS packages on the BASS webpage, so that separate download is no longer available/needed.

so is that mean the libraries in "bass24-osx.zip" is the Universal version for x64 and arm64?

Ian @ un4seen

Yes, the macOS libraries are universal, including support for the x86_64/arm64/i386 architectures. If any are unwanted, the makefile included in the BASS package can be used to separate them.