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

Ian @ un4seen

  • Administrator
  • Posts: 26083
BASS for iOS (iPhone/iPad)
« on: 16 Feb '10 - 16:32 »

iOS versions of BASS and the add-ons can be found on the BASS webpage.




« Last Edit: 10 Jan '24 - 18:02 by Ian @ un4seen »

ken

  • Posts: 752
Re: BASS for iPhoneOS
« Reply #1 on: 16 Feb '10 - 18:01 »
In there is any C# coders that use MonoTouch framework for developing iPhone apps, I'm happy to tell you that BASS for IPhone works with MonoTouch (yes you can link static libraries in MonoTouch). I can make a simple MonoTouch example if needed.

/Ken

ReymonARG

  • Posts: 41
Re: BASS for iPhoneOS
« Reply #2 on: 16 Feb '10 - 19:03 »
Nice Job, Next for BlackberryOS  ;)

ken

  • Posts: 752
Re: BASS for iPhoneOS
« Reply #3 on: 16 Feb '10 - 20:15 »
Nice Job, Next for BlackberryOS  ;)

Don't forget Android...

radio42

  • Posts: 4839
Re: BASS for iPhoneOS
« Reply #4 on: 16 Feb '10 - 20:20 »
A Bass.Net version for iPhone is comming soon...

StuC

  • Guest
Re: BASS for iPhoneOS
« Reply #5 on: 17 Feb '10 - 15:51 »

What the Licensing/Cost  of the iPhone version ?



Ian @ un4seen

  • Administrator
  • Posts: 26083
Re: BASS for iPhoneOS
« Reply #6 on: 17 Feb '10 - 16:59 »
Licensing is the same on all of the supported platforms. In the case of the Shareware licence, an amendment has been made primarily with the iPhone App Store in mind, whereby the product doesn't actually have to be shareware (eg. "try before you buy") but the price limit is lowered to 10 Euros then.

NeoStrider

  • Posts: 3
Re: BASS for iPhoneOS
« Reply #7 on: 23 Mar '10 - 22:00 »
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: 26083
Re: BASS for iPhoneOS
« Reply #8 on: 24 Mar '10 - 16:17 »
That looks like it is linking with the wrong library version, eg. the "simulator" BASS when you're building a "device" application. I think the simplest way to avoid that problem is to just add both BASS library versions to the project.

edit: Actually, looking at it again (more closely this time!), that looks like it is linking with the wrong CFNetwork framework version, ie. the OSX version rather than the iPhone version? You could try removing that from the project, and then adding it again, eg. right-click on the project, select "Get Info", click the "+" button below the "Linked Libraries" list, and select "CFNetwork" from the list of frameworks.
« Last Edit: 24 Mar '10 - 17:43 by Ian @ un4seen »

NeoStrider

  • Posts: 3
Re: BASS for iPhoneOS
« Reply #9 on: 24 Mar '10 - 18:07 »
Nevermind...it was XCode fault...again...
Got everything working very well here.
Now is time to evaluate the licenses...
Thanks!

Bert

  • Posts: 176
Re: BASS for iPhoneOS
« Reply #10 on: 26 Mar '10 - 16:32 »
Do you want to share your working example with us?

Would be very nice!

NeoStrider

  • Posts: 3
Re: BASS for iPhoneOS
« Reply #11 on: 26 Mar '10 - 16:35 »
Its surprisingly the same as the macosx radio player. The only problem was removing the callbacks and handlers from Carbon Stuff. I still need to write a proper buffer manager, and then I promisse to give back to you something...

rdalton

  • Posts: 5
Re: BASS for iPhoneOS
« Reply #12 on: 6 Apr '10 - 04:45 »
Hi Ian,

The iPhone port is much appreciated.  Nice work!  I was just wondering if you are using the Tremor decoder (fixed-point Ogg decoder)?  If not, are there any plans to incorporate it sometime soon?

Thanks.

Robert

atatum1

  • Guest
Re: BASS for iPhoneOS
« Reply #13 on: 6 Apr '10 - 11:50 »
Is there a blackberry version as well please?

hippocoder

  • Posts: 14
Re: BASS for iPhoneOS
« Reply #14 on: 6 Apr '10 - 14:30 »
Does this work with the iPad?
« Last Edit: 6 Apr '10 - 15:16 by hippocoder »

Bert

  • Posts: 176
Re: BASS for iPhoneOS
« Reply #15 on: 6 Apr '10 - 15:37 »
Yes, i think it's working on the ipad.

hippocoder

  • Posts: 14
Re: BASS for iPhoneOS
« Reply #16 on: 6 Apr '10 - 15:38 »
Brilliant!

I want to deploy to windows, mac, iphone and ipad. I do have plans to use android and windows mobile but I think I will just have to recode those bits (bite the bullet) so to speak.

Ian @ un4seen

  • Administrator
  • Posts: 26083
Re: BASS for iPhoneOS
« Reply #17 on: 6 Apr '10 - 15:51 »
I was just wondering if you are using the Tremor decoder (fixed-point Ogg decoder)?  If not, are there any plans to incorporate it sometime soon?

The fixed-point OGG decoder is used in the WinCE version of BASS, but not the iPhone version, as the iPhone does have an FPU. I don't remember the numbers now, but I seem to recall finding that the fixed-point decoder wasn't faster on the iPhone.

Is there a blackberry version as well please?

I'm afraid there aren't any plans for that at the moment, but who knows in the future :)

sui

  • Guest
Re: BASS for iPhoneOS
« Reply #18 on: 22 Apr '10 - 14:19 »
Hi everybody,

I tried BASS for my iPhone application. It works very well but I have a problem...
When my iPhone locks screen, there is no more sound. I read Apple documentation, it seems that I should setup Audio sessions and set the AVAudioSessionCategoryPlayback category. But it has no effect.

Has anyone got this issue ?

Thanks a lot !

ken

  • Posts: 752
Re: BASS for iPhoneOS
« Reply #19 on: 22 Apr '10 - 17:40 »
Hi everybody,

I tried BASS for my iPhone application. It works very well but I have a problem...
When my iPhone locks screen, there is no more sound. I read Apple documentation, it seems that I should setup Audio sessions and set the AVAudioSessionCategoryPlayback category. But it has no effect.

Has anyone got this issue ?

Thanks a lot !

Try this code:

Code: [Select]
AudioSession.Category = AudioSessionCategory.MediaPlayback

sui

  • Guest
Re: BASS for iPhoneOS
« Reply #20 on: 23 Apr '10 - 08:17 »
I tried two things :

Code: [Select]
[[AVAudioSession sharedInstance] setDelegate: self];
[[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayback error: nil];
NSError *activationError = nil; [[AVAudioSession sharedInstance] setActive: YES error: &activationError];

and
Code: [Select]
UInt32 sessionCategory = kAudioSessionCategory_MediaPlayback;
AudioSessionSetProperty (kAudioSessionProperty_AudioCategory,  sizeof (sessionCategory), &sessionCategory);

It works with AVAudioPlayer but not with BASS...

I tried your code but I can't compile it (is it Obj C code ?).

Thanks a lot !


sui

  • Guest
Re: BASS for iPhoneOS
« Reply #21 on: 23 Apr '10 - 10:08 »
Ok, I just fixed it...

Call

Code: [Select]
BASS_Init(-1,44100,0,NULL,NULL);

BEFORE

Code: [Select]
UInt32 sessionCategory = kAudioSessionCategory_MediaPlayback;
AudioSessionSetProperty (kAudioSessionProperty_AudioCategory,  sizeof (sessionCategory), &sessionCategory);

And not after... It's better !

Thanks :)

ken

  • Posts: 752
Re: BASS for iPhoneOS
« Reply #22 on: 23 Apr '10 - 11:49 »
Ok, I just fixed it...

Thanks :)


Good to hear, I don't code in Obj-C, I use Monotouch and code in C#, thats why my call didn't work right of.


Ian @ un4seen

  • Administrator
  • Posts: 26083
Re: BASS for iPhoneOS
« Reply #23 on: 23 Apr '10 - 16:55 »
BASS_Init sets the "audio session category" itself, so that will be why you are having to apply your settings after the BASS_Init call, rather than before it.

BASS currently uses the kAudioSessionCategory_AmbientSound setting, as that allows the system audio to continue in the background, eg. if the user wants to listen to their music while playing a BASS-based game. But it looks like that is now (since iPhoneOS 3.0) possible with the kAudioSessionCategory_MediaPlayback setting too, so an updated build that uses that setting is now in the iPhone package (see the 1st post).

sui

  • Guest
Re: BASS for iPhoneOS
« Reply #24 on: 27 Apr '10 - 08:59 »
BASS_Init sets the "audio session category" itself, so that will be why you are having to apply your settings after the BASS_Init call, rather than before it.

BASS currently uses the kAudioSessionCategory_AmbientSound setting, as that allows the system audio to continue in the background, eg. if the user wants to listen to their music while playing a BASS-based game. But it looks like that is now (since iPhoneOS 3.0) possible with the kAudioSessionCategory_MediaPlayback setting too, so an updated build that uses that setting is now in the iPhone package (see the 1st post).

Ok, thanks Ian, I understood why it did not work.