Author Topic: BASS for iOS (iPhone/iPad)  (Read 705548 times)

Chris

  • Posts: 1980
Re: BASS for iOS (iPhone/iPad)
« Reply #1425 on: 20 May '21 - 12:00 »
Just try 
Code: [Select]
dependency 'stdc++'

promusicbisceglie

  • Posts: 20
Re: BASS for iOS (iPhone/iPad)
« Reply #1426 on: 21 May '21 - 16:46 »
[DCC Error] E2597 ld: library not found for -lstdc++
 :'(

Chris

  • Posts: 1980
Re: BASS for iOS (iPhone/iPad)
« Reply #1427 on: 21 May '21 - 22:31 »
which sdk have you in your SETUP?
Tools|Options, Deployment > SDK Manager ?

promusicbisceglie

  • Posts: 20
Re: BASS for iOS (iPhone/iPad)
« Reply #1428 on: 24 May '21 - 15:27 »
already sayd 14.5. The previous sdk (13.6) worked great,
don't tell me use 13.6 becouse apple now need 14.5 to publish an app... :'( :'( :'(

Ian @ un4seen

  • Administrator
  • Posts: 23926
Re: BASS for iOS (iPhone/iPad)
« Reply #1429 on: 25 May '21 - 13:17 »
Does RAD Studio have a "Deployment Target" option? If so, what is that set to, and does lowering it help? Can you try other iOS 14 SDK versions (eg. 14.0) or is 14.5 the only version available?

The BASS_APE and TAGS add-ons also require the standard C++ library, so I guess you get the same errors if you try removing BASS_FX from your code and using either of them?

promusicbisceglie

  • Posts: 20
Re: BASS for iOS (iPhone/iPad)
« Reply #1430 on: 25 May '21 - 17:47 »
yes i use developement target... A.Store only when i must publish..
Never used BASS_APE , can you tell me some function in .pas like this below??
eg .. function BASS_Encode_Start(handle:HSTREAM; cmdline:PChar; flags:DWORD; proc:ENCODEPROC; user:Pointer): HENCODE;cdecl; external 'libbassenc.a' name 'BASS_Encode_Start';
Actually cannot downgrade less of 14.5 (need this version of xcode)

Ian @ un4seen

  • Administrator
  • Posts: 23926
Re: BASS for iOS (iPhone/iPad)
« Reply #1431 on: 26 May '21 - 15:34 »
yes i use developement target... A.Store only when i must publish..

No, I meant the "Deployment Target" setting, which sets the minimum iOS version that's required by the app. Here's what it looks like in Xcode:

   https://developer.apple.com/library/archive/documentation/ToolsLanguages/Conceptual/Xcode_Overview/WorkingwithTargets.html

Does RAD Studio have that option?

Never used BASS_APE , can you tell me some function in .pas like this below??

BASS_APE only has 2 functions: BASS_APE_StreamCreateFile and BASS_APE_StreamCreateFileUser. You can get the BASS_APE.PAS file from the Win32 BASS_APE package (on the BASS webpage).

promusicbisceglie

  • Posts: 20
Re: BASS for iOS (iPhone/iPad)
« Reply #1432 on: 26 May '21 - 15:39 »
i found my self...
BASS_APE is OK!! , bass_FX not :-\

promusicbisceglie

  • Posts: 20
Re: BASS for iOS (iPhone/iPad)
« Reply #1433 on: 26 May '21 - 15:47 »
i've
in compiler -> linking options
Minimum iOS version supported = 11.0

Ian @ un4seen

  • Administrator
  • Posts: 23926
Re: BASS for iOS (iPhone/iPad)
« Reply #1434 on: 26 May '21 - 16:46 »
i found my self...
BASS_APE is OK!! , bass_FX not :-\

That's strange. Did you add a BASS_APE function call to your code? If not, please try that, because the linker probably won't include the BASS_APE library in the app if it isn't actually used.

promusicbisceglie

  • Posts: 20
Re: BASS for iOS (iPhone/iPad)
« Reply #1435 on: 26 May '21 - 17:25 »
Yes , if you see the attachement you can see your self..
i added
function BASS_APE_StreamCreateFile(mem: BOOL; f: Pointer; offset, length: QWORD; flags: DWORD): HSTREAM; cdecl; external 'libbass_ape.a' name 'BASS_APE_StreamCreateFile';
and libbass_ape.a in the project root (where is bass, bassmidi etc..)... and it work
edit : In the example i send you i don't call BASS_FX and dont call BASS_APE..just declare bass_fx and crash

EDIT2.... While bassfx fails also if it is not call, bass_ape fails when i call in the code
now i added   : tests:=BASS_APE_StreamCreateFile(false,nil,128,0,0);  and compiler fails with same errors...
_ZdlPv etc.... 
Any solutions?? i need use bass_fx..
« Last Edit: 27 May '21 - 10:35 by promusicbisceglie »

promusicbisceglie

  • Posts: 20
Re: BASS for iOS (iPhone/iPad)
« Reply #1436 on: 27 May '21 - 12:02 »
I found a solution!!
I 've copied libc++.dylib from ...SDKs\iPhoneOS13.6.sdk\usr\lib  to ...SDKs\iPhoneOS14.5.sdk\usr\lib
with old libc++.dylib compilation has been success !

Remember to add dependency 'c++' in BASS_FX declare funcion for iOS
« Last Edit: 27 May '21 - 18:00 by promusicbisceglie »

Ian @ un4seen

  • Administrator
  • Posts: 23926
Re: BASS for iOS (iPhone/iPad)
« Reply #1437 on: 27 May '21 - 16:41 »
Good to see that you've found a solution! If anyone else encounters the same problem, they'll know what to do now.

Ian @ un4seen

  • Administrator
  • Posts: 23926
Re: BASS for iOS (iPhone/iPad)
« Reply #1438 on: 25 Jun '21 - 14:55 »
The iOS version of the BASS 2.4.16 release is up in the 1st post. The BASS and add-on libraries are also now in XCFramework form and include arm64 simulator support.

Ian @ un4seen

  • Administrator
  • Posts: 23926
Re: BASS for iOS (iPhone/iPad)
« Reply #1439 on: 15 Jul '21 - 13:09 »
The iOS version of the BASSOPUS 2.4.2 release is up in the 1st post.

teq

  • Posts: 73
Re: BASS for iOS (iPhone/iPad)
« Reply #1440 on: 23 Jul '21 - 11:58 »
I use BASS with Unity. I recently noticed that another 3rd-party project that also uses BASS has subfolder called "Headers" in the iOS folder.
In my experience the app can be compiled without these headers, but may be i did it wrong...So could you please clarify if you need to use headers for iOS builds?

Ian @ un4seen

  • Administrator
  • Posts: 23926
Re: BASS for iOS (iPhone/iPad)
« Reply #1441 on: 23 Jul '21 - 16:23 »
What are the files in that "Headers" folder? If it's the C/C++ headers (eg. BASS.H) then I don't think they would be needed when using Unity/C#.

Anthony Y

  • Posts: 11
Undefined symbol: _vDSP_fft_zip
« Reply #1442 on: 25 Jul '21 - 12:30 »
I have linked libbass.xcframework and bass.h files but getting
Undefined symbol: _vDSP_fft_zip
Undefined symbol: _vDSP_create_ffsetup
error messages.

Does it mean I have done something wrong?

The error occurs when calling BASS_Init as below,
if ((BASS_Init(-1, 44100, DWORD(BASS_DEVICE_AUDIOTRACK), nil, nil) == 0)) {
   ...
   ...
}

jnyang

  • Guest
Re: BASS for iOS (iPhone/iPad)
« Reply #1443 on: 26 Jul '21 - 06:48 »
Hi Ian, is there any plan to support XCFramework format for the BASS_FX plugin? It seems that that plugin is not converted to the XCFramework format yet.

jnyang

  • Guest
Re: BASS for iOS (iPhone/iPad)
« Reply #1444 on: 26 Jul '21 - 10:36 »
Also, it seems that configuring BASS_CONFIG_IOS_SESSION with the BASS_SetConfig function does not work on the latest version (BASS_GetVersion() = 33820675).

Ian @ un4seen

  • Administrator
  • Posts: 23926
Re: BASS for iOS (iPhone/iPad)
« Reply #1445 on: 26 Jul '21 - 12:58 »
I have linked libbass.xcframework and bass.h files but getting
Undefined symbol: _vDSP_fft_zip
Undefined symbol: _vDSP_create_ffsetup
error messages.

Does it mean I have done something wrong?

The error occurs when calling BASS_Init as below,
if ((BASS_Init(-1, 44100, DWORD(BASS_DEVICE_AUDIOTRACK), nil, nil) == 0)) {
   ...
   ...
}

Adding the Accelerate framework to your project should fix that.

It won't cause a problem, but you can also remove the BASS_DEVICE_AUDIOTRACK flag from the BASS_Init call, as that only has effect on Android.

Hi Ian, is there any plan to support XCFramework format for the BASS_FX plugin? It seems that that plugin is not converted to the XCFramework format yet.

The BASS_FX link in the first post has now been updated with an XCFramework version.

Also, it seems that configuring BASS_CONFIG_IOS_SESSION with the BASS_SetConfig function does not work on the latest version (BASS_GetVersion() = 33820675).

That's strange. What setting are you trying to use in the BASS_SetConfig call? And are you doing that before or after the BASS_Init call? If after, please try before and see if that makes any difference.

jnyang

  • Guest
Re: BASS for iOS (iPhone/iPad)
« Reply #1446 on: 26 Jul '21 - 15:14 »
The BASS_FX link in the first post has now been updated with an XCFramework version.
Thanks for your quick update!

Also, it seems that configuring BASS_CONFIG_IOS_SESSION with the BASS_SetConfig function does not work on the latest version (BASS_GetVersion() = 33820675).

That's strange. What setting are you trying to use in the BASS_SetConfig call? And are you doing that before or after the BASS_Init call? If after, please try before and see if that makes any difference.

My original code called BASS_SetConfig before calling BASS_Init. Adjusting BASS_CONFIG_IOS_SESSION before calling BASS_Init worked on the previous version.

It seems that adjusting that config just right after calling BASS_Init works well. I also tried to create a new project to test its behavior without any bias, both in Objective-C and Swift, and the same issue happens. Maybe this behaviour needs to be mentioned in the documentation :)

Also, when I created the new project, I found that "AVFoundation.framework" is required to use BASS, which is not mentioned in the 1st post. Thanks!

Ian @ un4seen

  • Administrator
  • Posts: 23926
Re: BASS for iOS (iPhone/iPad)
« Reply #1447 on: 26 Jul '21 - 16:56 »
The AVFoundation framework is indeed required with the latest BASS version. I've added it to the framework list in the 1st post now.

Regarding the BASS_CONFIG_IOS_SESSION issue, please also confirm what value you're using in the BASS_SetConfig call (in case it's making a difference).

jnyang

  • Guest
Re: BASS for iOS (iPhone/iPad)
« Reply #1448 on: 27 Jul '21 - 02:03 »
The AVFoundation framework is indeed required with the latest BASS version. I've added it to the framework list in the 1st post now.

Regarding the BASS_CONFIG_IOS_SESSION issue, please also confirm what value you're using in the BASS_SetConfig call (in case it's making a difference).

I initially tried to set BASS_CONFIG_IOS_SESSION to 0 for configuring audio session category to AVAudioSessionCategoryPlayback, and it didn't worked. Then I tried to set it to different values (e.g., BASS_IOS_SESSION_MIX, BASS_IOS_SESSION_DISABLE, etc.), but none of them worked.

For your information, I tried to make a new project, configured all required frameworks (Accelerate, AudioToolbox, AVFoundation, CFNetwork, SystemConfiguration), added libbass.xcframework (with setting "Embed & Sign" on the project setting panel), and added some codes in AppDelegate.swift (or AppDelegate.m for Objective-C) like this:
Code: [Select]
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
  print(BASS_GetVersion())
  BASS_SetConfig(DWORD(BASS_CONFIG_IOS_SESSION), DWORD(BASS_IOS_SESSION_DISABLE))
 
  return true
}

BASS_GetVersion() worked well (i.e., the BASS library is loaded), but calling BASS_SetConfig throws an error "EXC_BAD_ACCESS (code=1, address=0x0)". The test was proceeded on the iPhone with the latest iOS (iOS 14.7) and Simulator. The latest Xcode (12.5.1) was used. Please let me know if I can provide any further information. Thanks.

Anthony Y

  • Posts: 11
bass_midi.h ?
« Reply #1449 on: 27 Jul '21 - 11:09 »
Hi Ian,

Is there bass_midi.h file like bass.h?

I am trying to call BASS_MIDI_FontInit(...) to start with.