BASS for ARM64 Windows

Started by Ian @ un4seen,

Ian @ un4seen

ARM64 versions of the Win32 BASS and add-on releases (those listed under "Add-ons" on the BASS webpage) are available here:

   www.un4seen.com/files/bass24-arm64.zip

The contents are arranged so that it can be extracted in the same folder as the Win32 BASS package, adding an "arm64" subfolder to that.

These other add-ons are also available:

   www.un4seen.com/files/z/2/bass_mpc24-arm64.zip
   www.un4seen.com/files/z/0/bass_fx24-arm64.zip
   www.un4seen.com/files/z/3/basstags-arm64.zip

Miguel

Hello, since Windows ARM64 version of BASS has been available, do you also provide Windows ARM32 version (for Windows RT Desktop and Windows Phone 10 UWP)? I don't think this is infeasible technically.

Ian @ un4seen

Yes, 32-bit ARM support is included in the UWP BASS package, available in this thread:

    www.un4seen.com/forum/?topic=16665

D seto

bass_aac.dll I didn't see arm64 windows versions of this file in the links on the site. Are they somewhere else? All the other ones appear to be there.

Ian @ un4seen

AAC is supported as standard by BASS on modern Windows (using Media Foundation), so the BASS_AAC add-on shouldn't be needed there. Are you finding that AAC files/streams aren't playable?

D Seto

Thanks for that I figured it out. My app was written for Windows 7/8 and used bass aac to do crossfade support. Thanks to your help I disabled the crossfade and run with WF without needing to update bass aac.

3delite

Is there a chance for WinARM64EC builds?
Delphi recently got this build target and I am experimenting with it.

Ian @ un4seen

I haven't tried this stuff myself yet, but here's an ARM64EC BASS.DLL for you to try:

    www.un4seen.com/stuff/bass-arm64ec.zip

x64 DLLs can also be used in an ARM64EC app, so please compare performance (eg. BASS_GetCPU values) between the ARM64EC and x64 BASS.DLL (on the same system) to see what difference there is. You can get the latest x64 build here:

    www.un4seen.com/stuff/bass.zip

If ARM64EC works well then for simplicity it'll probably be best to change the existing ARM64 builds to ARM64X, which includes both ARM64 and ARM64EC in a single DLL, although doing so will almost double the DLL's size.

3delite

Thank you very much for the build!
I try this in the following days.

3delite

Trying a simple MP3 playback, everything was ok.
Playback processing is a bit faster, not significantly.

Decode test with an MP3:
Win64: ~250 ms
WinARM64EC: ~200 ms

These are expected values, they say Win64 emulation gives a 20-30% penalty, so it seems logical.

I am not sure what to suggest about combining into a single DLL.
Up to Delphi 13.1 users, they will need a WinARM64EC build, not sure if the new Delphi coming in a couple of days will support native WinARM64.
If I would be needed to decide I would not combine. It does need more administration to maintan both builds, but how many BASS developers would need a universal DLL? Maybe 20% or even less.

Ian @ un4seen

Quote from: 3deliteDecode test with an MP3:
Win64: ~250 ms
WinARM64EC: ~200 ms

These are expected values, they say Win64 emulation gives a 20-30% penalty, so it seems logical.

Good to see the ARM64EC build seems to be working well. Can you compare OGG files too? The MP3 decoder has significant SSE (on x64) and NEON (on arm64) optimizations, while the OGG decoder doesn't, so perhaps it'll have different performance gains.

Quote from: 3deliteI am not sure what to suggest about combining into a single DLL.
Up to Delphi 13.1 users, they will need a WinARM64EC build, not sure if the new Delphi coming in a couple of days will support native WinARM64.

ARM64X DLLs should work in both ARM64 and ARM64EC apps. Here's a build for you to try with Delphi:

    www.un4seen.com/stuff/bass-arm64x.zip

3delite

Trying the combined build, seems ok and Ogg playback works.

Decode test with a 1 hour Ogg:
Win64: ~6 600 ms
WinARM64X: ~5 200 ms

Here is the test app. with sources: https://www.3delite.hu/BASS/BASS%20WinARM64%20Benchmark.zip

Ian @ un4seen

So that's around a 20% performance boost again, like with the MP3 file.

3delite

Yes, it seems working fine.

I use 2 Focusrite Scarlett 16i16 USB audio interfaces connected together with ADAT, and fortunately there is WinARM64 (driver) support.
So trying BASS ASIO, both the Win64 and WinARM64EC builds seems working (just a quick playback test).
bass.dll - Win64/WinARM64EC
bassasio.dll - Win64

But not sure how this works... These ASIO drivers are just DLLs? Don't quite understand if WinARM64EC works then what kind of ASIO driver DLL is loaded (by the Win64 build of bassasio.dll)?

Here is the test app. if anyone is interested: https://www.3delite.hu/BASS/BASS%20WinARM64%20ASIO.zip

Ian @ un4seen

ARM64EC apps can't use normal ARM64 DLLs, so the loaded ASIO driver DLL will be either ARM64EC/ARM64X or x64 in that case, and in the x64 case too. In both cases, ARM64EC/ARM64X and x64 DLLs can be mixed, so the x64 BASSASIO.DLL can use an ARM64EC/ARM64X ASIO driver DLL. Similarly, x64 add-ons can be used with the ARM64EC/ARM64X BASS.DLL.

3delite

#15
I know this basically, thank you, but I found out what I did not know, that a Win64 process on a WinARM64 Windows, seems, can also load WinARM64EC DLLs!
If this is true then everyting is understandable.

My issue was that there are 2 ASIO DLLs in the drivers folder and there is just a x86 and a (found out with dumpbin) a WinARM64X build. So it seems my Win64 process loads this "fat" DLL and picks the "EC" slice. Interesting... :)

Everything is clear now, thank you!

So it seems it does make sense to distribute "fat" WinARM64 builds of the BASS DLLs (less headache and confusion for the developers).

Ian @ un4seen

Yep, x64 emulated apps can indeed load ARM64EC DLLs. One thing to note is that x64 emulation and ARM64EC is only supported by Windows 11 (ARM version). Such apps/DLLs won't work on Windows 10. ARM64X works on both because it includes ARM64 and ARM64EC code, which is why it'd probably be a good idea for the BASS DLLs to be ARM64X. The only negative I see is the increased file size. Unfortunately, there doesn't appear to currently be any simple way to split ARM64X files into separate ARM64 and ARM64EC files (for people who know they only need one of those), but perhaps one day there will be.

3delite

I think these "fat" DLLs are the way to go. But if you decide there could be 2 folders in the "bass24-arm64.zip" package, a pure "WinARM64" and a "WinARM64X" folder.
It really does not metter if a DLL is 300 KB or 600 KB in 2026 in my opinion.

3delite

Could you please provide these DLLs with WinARM64EC supported builds? Combined WinARM64/WinARM64EC builds are ok for me as well.

bass.dll (if the last posted version is ok, then cool)
bass_fx.dll
bass_vst.dll
bassasio.dll
bassenc.dll
bassenc_flac.dll
bassenc_mp3.dll
bassenc_ogg.dll
bassenc_opus.dll
bassmix.dll
basswasapi.dll

Thank you very much!