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

Ned

  • Guest
Re: BASS for iOS (iPhone/iPad)
« Reply #1100 on: 23 Oct '15 - 23:27 »
I haven't tried it myself, but I guess it would be possible to embed DYLIB files inside an executable and have it extract and load them dynamically at runtime, like can be done with DLLs on Windows. I don't think there is much reason to embed libraries within the executable on OSX though, as an ".app" file is actually a directory containing a bunch of files (including libraries), ie. it isn't a single executable file anyway.

I was actually thinking was more along the lines of a command-line application, whereas it being a single self-contained executable.

Oleg N

  • Posts: 86
Re: BASS for tvOS
« Reply #1101 on: 24 Oct '15 - 11:27 »
Regarding tvOS, Apple says all libs must be re-compiled under tvOS target to link in tvOS apps.
When using ios static libs to build app for device I get: "(libbassdsd.a-arm64-master.o), building for tvOS, but linking in object file built for iOS, for architecture arm64"

looks like we need tvos BASS libs...

Ian @ un4seen

  • Administrator
  • Posts: 20427
Re: BASS for iOS (iPhone/iPad)
« Reply #1102 on: 26 Oct '15 - 16:46 »
A tvOS version of the BASS library (and BASSmix) was posted recently. Here's the link:

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

Note that you will need to link with the AVFoundation and AudioToolbox frameworks in your project.

Oleg N

  • Posts: 86
Re: BASS for iOS (iPhone/iPad)
« Reply #1103 on: 26 Oct '15 - 19:54 »
Thanks for tvos builds, this is the update:

Code: [Select]
ld: '/Users/oleg/dev/experimental/tvtest2/tvtest2/libbass.a(libbass.a-arm64-master.o)' does not contain bitcode.
You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE) or obtain an updated library from the
vendor for architecture arm64

so it won't link currently. Simulator build works just fine.
« Last Edit: 27 Oct '15 - 06:54 by Oleg N »

Ian @ un4seen

  • Administrator
  • Posts: 20427
Re: BASS for iOS (iPhone/iPad)
« Reply #1104 on: 27 Oct '15 - 15:19 »
Bitcode isn't currently supported, so that will need to be disabled in Xcode (set "Enable Bitcode" to "No").

Oleg N

  • Posts: 86
Re: BASS for iOS (iPhone/iPad)
« Reply #1105 on: 28 Oct '15 - 03:58 »
sadly,

Code: [Select]
target 'tvtest2' has bitcode disabled (ENABLE_BITCODE = NO), but it is required for the 'appletvos' platform

Ian @ un4seen

  • Administrator
  • Posts: 20427
Re: BASS for iOS (iPhone/iPad)
« Reply #1106 on: 28 Oct '15 - 16:24 »
Oh yes, I just noticed that bitcode is mandatory for tvOS app store submissions. I'll send you something to try.

architecture x86_64:

  • Guest
BASS for iOS (iPhone/iPad)
« Reply #1107 on: 6 Nov '15 - 09:19 »
Undefined symbols for architecture x86_64:
  "_CGContextAddLineToPoint", referenced from:
      -[AudioEffectsController drawline:labelText:] in AudioEffectsController.o
  "_CGContextBeginPath", referenced from:
      -[AudioEffectsController drawline:labelText:] in AudioEffectsController.o
  "_CGContextMoveToPoint", referenced from:
      -[AudioEffectsController drawline:labelText:] in AudioEffectsController.o
  "_CGContextSetAllowsAntialiasing", referenced from:
      -[AudioEffectsController drawline:labelText:] in AudioEffectsController.o
  "_CGContextSetLineCap", referenced from:
      -[AudioEffectsController drawline:labelText:] in AudioEffectsController.o
  "_CGContextSetLineWidth", referenced from:
      -[AudioEffectsController drawline:labelText:] in AudioEffectsController.o
  "_CGContextSetRGBStrokeColor", referenced from:
      -[AudioEffectsController drawline:labelText:] in AudioEffectsController.o
  "_CGContextStrokePath", referenced from:
      -[AudioEffectsController drawline:labelText:] in AudioEffectsController.o
  "_OBJC_CLASS_$_UIButton", referenced from:
      objc-class-ref in SpecialEffectsController.o
      objc-class-ref in AudioEffectsController.o
  "_OBJC_CLASS_$_UIColor", referenced from:
      objc-class-ref in SpecialEffectsController.o
      objc-class-ref in AudioEffectsController.o
  "_OBJC_CLASS_$_UIFont", referenced from:
      objc-class-ref in SpecialEffectsController.o
      objc-class-ref in AudioEffectsController.o
  "_OBJC_CLASS_$_UIImage", referenced from:
      objc-class-ref in SpecialEffectsController.o
      objc-class-ref in AudioEffectsController.o
  "_OBJC_CLASS_$_UIImageView", referenced from:
      objc-class-ref in AudioEffectsController.o
  "_OBJC_CLASS_$_UILabel", referenced from:
      objc-class-ref in SpecialEffectsController.o
      objc-class-ref in AudioEffectsController.o
  "_OBJC_CLASS_$_UIResponder", referenced from:
      _OBJC_CLASS_$_AppDelegate in AppDelegate.o
  "_OBJC_CLASS_$_UIScreen", referenced from:
      objc-class-ref in SpecialEffectsController.o
      objc-class-ref in AudioEffectsController.o
  "_OBJC_CLASS_$_UIScrollView", referenced from:
      objc-class-ref in SpecialEffectsController.o
      objc-class-ref in AudioEffectsController.o
  "_OBJC_CLASS_$_UISlider", referenced from:
      objc-class-ref in SpecialEffectsController.o
      objc-class-ref in AudioEffectsController.o
  "_OBJC_CLASS_$_UIView", referenced from:
      objc-class-ref in SpecialEffectsController.o
      objc-class-ref in AudioEffectsController.o
  "_OBJC_CLASS_$_UIViewController", referenced from:
      _OBJC_CLASS_$_ViewController in ViewController.o
  "_OBJC_METACLASS_$_UIResponder", referenced from:
      _OBJC_METACLASS_$_AppDelegate in AppDelegate.o
  "_OBJC_METACLASS_$_UIViewController", referenced from:
      _OBJC_METACLASS_$_ViewController in ViewController.o
  "_UIApplicationMain", referenced from:
      _main in main.o
  "_UIGraphicsBeginImageContext", referenced from:
      -[AudioEffectsController drawline:labelText:] in AudioEffectsController.o
  "_UIGraphicsEndImageContext", referenced from:
      -[AudioEffectsController drawline:labelText:] in AudioEffectsController.o
  "_UIGraphicsGetCurrentContext", referenced from:
      -[AudioEffectsController drawline:labelText:] in AudioEffectsController.o
  "_UIGraphicsGetImageFromCurrentImageContext", referenced from:
      -[AudioEffectsController drawline:labelText:] in AudioEffectsController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

TurboC

  • Posts: 1
Re: BASS for iOS (iPhone/iPad)
« Reply #1108 on: 6 Nov '15 - 09:58 »
Undefined symbols for architecture arm64:
  "_vDSP_create_fftsetup", referenced from:
      _BASS_ChannelGetData in libbass.a(libbass.a-arm64-master.o)
  "_vDSP_fft_zip", referenced from:
      _BASS_ChannelGetData in libbass.a(libbass.a-arm64-master.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Ian @ un4seen

  • Administrator
  • Posts: 20427
Re: BASS for iOS (iPhone/iPad)
« Reply #1109 on: 6 Nov '15 - 16:51 »
Adding the Accelerate framework to your project should fix the vDSP errors. The other error messages appear to be unrelated to BASS?

ticr

  • Guest
Re: BASS for iPhoneOS
« Reply #1110 on: 23 Nov '15 - 05:46 »
How do you solve it?

I'm having a few issues with a adaptation of the net-radio example.
I`ve successfully adapted it to iPhone and it works fine on the simulator, but I cant seem to build it for the devices. Here is my error log:

Code: [Select]
ld: warning: in /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/CFNetwork, missing required architecture arm in file
Undefined symbols:
  "_kCFStreamPropertyFTPFileTransferOffset", referenced from:
      _kCFStreamPropertyFTPFileTransferOffset$non_lazy_ptr in libbass.a(bass.o)
  "_kCFStreamPropertyHTTPShouldAutoredirect", referenced from:
      _kCFStreamPropertyHTTPShouldAutoredirect$non_lazy_ptr in libbass.a(bass.o)
  "_CFHTTPMessageAddAuthentication", referenced from:
      _BASS_RecordGetInputName in libbass.a(bass.o)
      _BASS_RecordGetInputName in libbass.a(bass.o)
  "_CFHTTPMessageCreateRequest", referenced from:
      _BASS_RecordGetInputName in libbass.a(bass.o)
  "_kCFStreamPropertyFTPFetchResourceInfo", referenced from:
      _kCFStreamPropertyFTPFetchResourceInfo$non_lazy_ptr in libbass.a(bass.o)
  "_kCFStreamPropertyFTPResourceSize", referenced from:
      _kCFStreamPropertyFTPResourceSize$non_lazy_ptr in libbass.a(bass.o)
  "_CFReadStreamCreateWithFTPURL", referenced from:
      _BASS_RecordGetInputName in libbass.a(bass.o)
  "_kCFStreamPropertyHTTPResponseHeader", referenced from:
      _kCFStreamPropertyHTTPResponseHeader$non_lazy_ptr in libbass.a(bass.o)
  "_kCFHTTPAuthenticationSchemeBasic", referenced from:
      _kCFHTTPAuthenticationSchemeBasic$non_lazy_ptr in libbass.a(bass.o)
  "_kCFStreamPropertyFTPUsePassiveMode", referenced from:
      _kCFStreamPropertyFTPUsePassiveMode$non_lazy_ptr in libbass.a(bass.o)
  "_CFHTTPMessageCopySerializedMessage", referenced from:
      _BASS_RecordGetInputName in libbass.a(bass.o)
  "_kCFHTTPVersion1_1", referenced from:
      _kCFHTTPVersion1_1$non_lazy_ptr in libbass.a(bass.o)
  "_CFReadStreamCreateForHTTPRequest", referenced from:
      _BASS_RecordGetInputName in libbass.a(bass.o)
  "_kCFStreamPropertyFTPProxy", referenced from:
      _kCFStreamPropertyFTPProxy$non_lazy_ptr in libbass.a(bass.o)
  "_kCFStreamPropertyHTTPProxy", referenced from:
      _kCFStreamPropertyHTTPProxy$non_lazy_ptr in libbass.a(bass.o)
  "_CFHTTPMessageSetHeaderFieldValue", referenced from:
      _BASS_RecordGetInputName in libbass.a(bass.o)
      _BASS_RecordGetInputName in libbass.a(bass.o)
      _BASS_RecordGetInputName in libbass.a(bass.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status

I really need this working ASAP, for a commercial project, please. BASS looks impressive and solved in hours what days of OGG ramblings couldn't help.
Have you guys used stuff only available in CoreServices?

Ian @ un4seen

  • Administrator
  • Posts: 20427
Re: BASS for iOS (iPhone/iPad)
« Reply #1111 on: 23 Nov '15 - 15:22 »
Are you linking with the CFNetwork framework in your project's "Build Phases" page? If not, please try that.

TICR

  • Guest
BASS for iOS (iPhone/iPad)
« Reply #1112 on: 25 Nov '15 - 05:36 »
are there some samples for firemonkey on IOS platform?

ken

  • Posts: 739
Re: BASS for iOS (iPhone/iPad)
« Reply #1113 on: 25 Nov '15 - 08:00 »
Are you linking with the CFNetwork framework in your project's "Build Phases" page? If not, please try that.

I had similar problem in Xamarin Studio. Try to add "-framework AudioToolbox" to "Additional mtouch arguments" i iOS build settings.

Here is my arguments:
Code: [Select]
-cxx -gcc_flags "-L${ProjectDir} -lbass -force_load ${ProjectDir}/libbass.a" -framework AudioToolbox

I have the libbass.a i root directory of the project and build settings set to "None". My "Link behavior" is set to "Link Frameworks SDKs Only"

Hope that helps.

some framework miss

  • Guest
Re: BASS for iOS (iPhone/iPad)
« Reply #1114 on: 28 Nov '15 - 04:18 »
Are you linking with the CFNetwork framework in your project's "Build Phases" page? If not, please try that.

[DCC Error] E2597 Undefined symbols for architecture arm64:
    Error: "_AudioConverterDispose", referenced from:      l382 in libbass.a(libbass.a-arm64-master.o);
      Error: "_AudioOutputUnitStart", referenced from:      l463 in libbass.a(libbass.a-arm64-master.o);
      Error: "_AudioOutputUnitStop", referenced from:      l025 in libbass.a(libbass.a-arm64-master.o);       l031 in libbass.a(libbass.a-arm64-master.o);       l033 in libbass.a(libbass.a-arm64-master.o);       l236 in libbass.a(libbass.a-arm64-master.o);
      Error: "_AudioUnitSetProperty", referenced from:      l031 in libbass.a(libbass.a-arm64-master.o);
      Error: "_AudioComponentInstanceDispose", referenced from:      l031 in libbass.a(libbass.a-arm64-master.o);       l236 in libbass.a(libbass.a-arm64-master.o);
      Error: "_AudioSessionSetProperty", referenced from:      l288 in libbass.a(libbass.a-arm64-master.o);
      Error: "_AudioUnitUninitialize", referenced from:      l031 in libbass.a(libbass.a-arm64-master.o);       l236 in libbass.a(libbass.a-arm64-master.o);
      Error: "_AudioSessionSetActive", referenced from:      l287 in libbass.a(libbass.a-arm64-master.o);       l289 in libbass.a(libbass.a-arm64-master.o);
      Error: "_AudioSessionInitialize", referenced from:      l288 in libbass.a(libbass.a-arm64-master.o);
  ld: symbol(s) not found for architecture arm64

Ian @ un4seen

  • Administrator
  • Posts: 20427
Re: BASS for iOS (iPhone/iPad)
« Reply #1115 on: 30 Nov '15 - 15:56 »
That looks like your project is currently missing the AudioToolbox framework. Please see the 1st post for a list of required frameworks.

ticr

  • Posts: 3
Re: BASS for iOS (iPhone/iPad)
« Reply #1116 on: 3 Dec '15 - 14:29 »
That looks like your project is currently missing the AudioToolbox framework. Please see the 1st post for a list of required frameworks.

Yes, I had fixed it on firemonkey.

Thankyou!

h3xl3r

  • Guest
Re: BASS for iOS (iPhone/iPad)
« Reply #1117 on: 18 Dec '15 - 05:04 »
Oh yes, I just noticed that bitcode is mandatory for tvOS app store submissions. I'll send you something to try.

I'd also ran into this problem and would like to try a version of bass built with bitcode ON for TVOS. Any progress or news on this matter? Thank!

Ian @ un4seen

  • Administrator
  • Posts: 20427
Re: BASS for iOS (iPhone/iPad)
« Reply #1118 on: 18 Dec '15 - 16:57 »
Please drop me a request via email (address in forum profile), and I'll send over the tvOS stuff for you to try.

Ian @ un4seen

  • Administrator
  • Posts: 20427
Re: BASS for iOS (iPhone/iPad)
« Reply #1119 on: 22 Jan '16 - 14:28 »
The iOS version of the BASSOPUS 2.4.1.7 release is now up in the 1st post.

Yuki

  • Guest
Re: BASS for iOS (iPhone/iPad)
« Reply #1120 on: 28 Jan '16 - 23:42 »
Is there a bass fx binary for iOS?  I tried using libbass_fx.dylib from bass_fx24-osx but it xcode barked at me saying:

dyld: Library not loaded: @loader_path/libbass_fx.dylib
  Referenced from: /Users/yukikonda/Library/Developer/CoreSimulator/Devices/883572E9-E07A-45FE-8B08-8FE438EFB3EA/data/Containers/Bundle/Application/67B5B715-D9D2-4DF8-9C67-ADCC77331F8A/iHeartRadio.app/iHeartRadio
  Reason: no suitable image found.  Did find:
   /Users/yukikonda/Library/Developer/CoreSimulator/Devices/883572E9-E07A-45FE-8B08-8FE438EFB3EA/data/Containers/Bundle/Application/67B5B715-D9D2-4DF8-9C67-ADCC77331F8A/YaruoBrowser.app/libbass_fx.dylib: mach-o, but not built for iOS simulator

Oleg N

  • Posts: 86
Re: BASS for iOS (iPhone/iPad)
« Reply #1121 on: 29 Jan '16 - 11:26 »
Yuki, for iOS, You should use static lib (libbass_fx.a), not dylib. You can find the lib in the first post of this thread, I think.
« Last Edit: 29 Jan '16 - 11:47 by Oleg N »

Rich

  • Posts: 47
Re: BASS for iOS (iPhone/iPad)
« Reply #1122 on: 8 Feb '16 - 23:16 »
Hi Ian,

is the new release a drop-in replacement for the existing libraries and headers?

Thanks for DSD by the way!

Thanks
Rich

Ian @ un4seen

  • Administrator
  • Posts: 20427
Re: BASS for iOS (iPhone/iPad)
« Reply #1123 on: 9 Feb '16 - 17:16 »
You can indeed simply replace existing BASS/add-on libraries and headers with updated versions, as all new 2.4.x releases should be back-compatible with previous 2.4.x versions. There will actually be a small exception to that in the upcoming BASS 2.4.12 release (affecting the BASS_CONFIG_NET_AGENT/PROXY options), which may need some small code changes (depending on how those 2 options are currently being used).

Rich

  • Posts: 47
Re: BASS for iOS (iPhone/iPad)
« Reply #1124 on: 11 Feb '16 - 09:19 »
Cheers - indeed they did just drop in.

Thanks
Rich