Author Topic: BASS for Mac Catalyst?  (Read 1666 times)

francis57

  • Posts: 37
BASS for Mac Catalyst?
« on: 25 Jul '20 - 00:41 »
Hello,
I had 2 apps, one for iOS, the other for Mac OSX, so I used libbass.a for iOS and libbass.dylib for Mac OSX. This worked without problems. Now I try to make one App for Mac Catalyst, but when I want to compile libbass.dylib as a framework, XCode compiler says following:

/Users/hdapper/Documents/CompasBuilder-Apps/CompasBuilder.Catalyst/Compás Builder/Compás Builder.xcodeproj Building for Mac Catalyst, but the linked and embedded library 'libbass.dylib' was built for macOS. You may need to restrict the platforms for which this library should be linked and embedded in the target editor, or replace it with an XCFramework that supports both platforms.

For hours working, I cannot get it to work.Changing the target or restricting the platforms in XCode like they suggest, does not solve the problem, same message appears.
Thanks in advance

Francis

Ian @ un4seen

  • Administrator
  • Posts: 26254
Re: BASS for Mac Catalyst?
« Reply #1 on: 27 Jul '20 - 16:30 »
I haven't tried Mac Catalyst myself, so I'm not familiar how things should be setup for that. I will look into it this week.

francis57

  • Posts: 37
Re: BASS for Mac Catalyst?
« Reply #2 on: 30 Aug '20 - 18:12 »
Thanks, Ian, sorry for being away for weeks

Ian @ un4seen

  • Administrator
  • Posts: 26254
Re: BASS for Mac Catalyst?
« Reply #3 on: 2 Sep '20 - 14:16 »
There has been some progress on this. Another BASS build will be needed for Mac Catalyst, as it won't work with macOS libraries (like your error message said). Still some things to be decided for that and it's not ready for public yet, but if you like I can send you something to try.

francis57

  • Posts: 37
Re: BASS for Mac Catalyst?
« Reply #4 on: 3 Oct '20 - 18:14 »
Hello Ian,
thank you very much for your answer, yes, I would like to try it! Thanks, Francis

Ian @ un4seen

  • Administrator
  • Posts: 26254
Re: BASS for Mac Catalyst?
« Reply #5 on: 5 Oct '20 - 14:00 »
I have emailed you something to try.

Salman Ahmed

  • Posts: 6
Re: BASS for Mac Catalyst?
« Reply #6 on: 25 Jul '23 - 01:20 »
Hello, I'm a developer from osu!. I'm experimenting moving our projects towards using Mac Catalyst, and I'm currently lacking the BASS libraries for the Mac Catalyst platform (BASS, BASS FX, and BASSmix). I would appreciate if you can lend me such libraries for both x86_64 and arm64 architectures.

Ian @ un4seen

  • Administrator
  • Posts: 26254
Re: BASS for Mac Catalyst?
« Reply #7 on: 26 Jul '23 - 12:39 »
I will email you the latest stuff to try.

francis57

  • Posts: 37
Re: BASS for Mac Catalyst?
« Reply #8 on: 22 Nov '23 - 23:59 »
Hi Ian,

the libbass.dylib and libbassmix.dylib you sent me those days have been working until Mac OS Sonoma now. Have you got sth for MacCatalyst for OS 14.1.1?

Bye
Francis

Ian @ un4seen

  • Administrator
  • Posts: 26254
Re: BASS for Mac Catalyst?
« Reply #9 on: 23 Nov '23 - 11:28 »
I will send you the latest stuff to try.

BS

  • Guest
Re: BASS for Mac Catalyst?
« Reply #10 on: 29 Jan '25 - 09:16 »
Hi Ian,

I’m currently working on Mac Catalyst app (both x64 and arm). Would it be possible to provide Mac Catalyst-compatible versions of BASS and BASS FX?

Additionally, if these libraries could support at least macOS 12 (which corresponds to Mac Catalyst 15), that would be perfect. It would also be great if these could be uploaded to the BASS download section, so they’re easily accessible in case of future issues.

Thanks in advance for considering this request! I really appreciate all the work that goes into maintaining BASS.

Best regards :)

Ian @ un4seen

  • Administrator
  • Posts: 26254
Re: BASS for Mac Catalyst?
« Reply #11 on: 29 Jan '25 - 16:58 »
Here's the latest Mac Catalyst stuff:

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

BS

  • Guest
Re: BASS for Mac Catalyst?
« Reply #12 on: 5 Feb '25 - 16:45 »
First of all, thank you for providing the Mac Catalyst build of BASS. I have successfully integrated it into my .NET MAUI app (using .NET 8 ) with Bass.NET as a wrapper.
BASS initializes correctly, and playback works on the first attempt. However, if I pause, stop, or let the stream finish, any attempt to play it again causes the app to freeze. The issue occurs regardless of whether the stream is created from a file or a URL.

Code sample:
Code: [Select]
// Initialization
var device = Bass.BASS_GetDevice();
Bass.BASS_Init(device, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero);
// Playback
var stream = Bass.BASS_StreamCreateFile(filePath, 0, 0, BASSFlag.BASS_DEFAULT);
Bass.BASS_ChannelPlay(stream, false);
// Pause
Bass.BASS_ChannelPause(stream);

Debug info:
BASS_ErrorGetCode() returns BASS_OK before the second play attempt, but in the system console I see the following error during initialization:

Quote
CARP violation: using HAL semantics (AUIOImpl_Base)
0            0x191c719cc   HandleCARPViolation + 212
1            0x12c322a24   AUNewPitchFactory + 7284
2            0x12c32c4f4   AUNewPitchFactory + 46916
3            0x12c3407e8   AUMultibandCompressorFactory + 3716
4            0x12c340758   AUMultibandCompressorFactory + 3572
5            0x12c324cdc   AUNewPitchFactory + 16172
6            0x12c328ae4   AUNewPitchFactory + 32052
7            0x12c3f8bb0   AUNotQuiteSoSimpleTimeFactory + 29132
8            0x12c3fd314   AUNotQuiteSoSimpleTimeFactory + 47408
9            0x1840242a8   AudioUnitInitialize + 336
10           0x1014b17bc   10  bass                                0x00000001014b17bc bass + 22460
11           0x1014bc890   BASS_Init + 400
12           0x1007af330   do_icall + 316
13           0x1007adbb4   do_icall_wrapper + 356
14           0x1007a25e0   mono_interp_exec_method + 2836
15           0x1007a0180   interp_runtime_invoke + 244
16           0x1006e8bf0   mono_jit_runtime_invoke + 1140
17           0x100689390   mono_runtime_invoke_checked + 148
18           0x100690e14   mono_runtime_try_invoke_byrefs + 548
19           0x10064d86c   ves_icall_InternalInvoke + 236
20           0x100657f4c   ves_icall_InternalInvoke_raw + 100
21           0x1007af2fc   do_icall + 264
22           0x1007adbec   do_icall_wrapper + 412
23           0x1007a25e0   mono_interp_exec_method + 2836
24           0x1007a0180   interp_runtime_invoke + 244
25           0x1006e8bf0   mono_jit_runtime_invoke + 1140
26           0x10068a2b8   mono_runtime_try_invoke + 156
27           0x10068d11c   mono_runtime_invoke + 516
28           0x1003ef9f0   xamarin_invoke_trampoline + 5400
29           0x1003f5b08   xamarin_ar<…>

Possible Cause:

Since I’m using Bass.NET as a wrapper, I’m wondering if it needs to be updated or adjusted for .NET 8 and Mac Catalyst. Could this be the issue? Any suggestions on how to resolve this?

Ian @ un4seen

  • Administrator
  • Posts: 26254
Re: BASS for Mac Catalyst?
« Reply #13 on: 6 Feb '25 - 17:12 »
BASS initializes correctly, and playback works on the first attempt. However, if I pause, stop, or let the stream finish, any attempt to play it again causes the app to freeze. The issue occurs regardless of whether the stream is created from a file or a URL.

Ah yes, I see it's getting stuck in a AudioOutputUnitStop call to suspend the output when nothing is playing. That code was recently tweaked a bit for iOS, but it apparently doesn't work the same in Mac Catalyst (note the Mac Catalyst version uses the iOS code rather than the macOS code). Here's an update that reverts to the old code for Mac Catalyst:

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

Let me know if you still have any problems with it. In case you would also like to try the latest iOS build (including the mentioned tweaks), that's available here:

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

BS

  • Guest
Re: BASS for Mac Catalyst?
« Reply #14 on: 7 Feb '25 - 11:54 »
Thanks for the update! The new Mac Catalyst build is working perfectly now—no more issues. Everything is running smoothly. Appreciate the quick fix!