23 May '13 - 02:03 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: 1 [2] 3 4 ... 36
  Reply  |  Print  
Author Topic: BASS for iOS (iPhone/iPad)  (Read 109870 times)
sui
Guest
« Reply #20 on: 23 Apr '10 - 08:17 »
Reply with quoteQuote

I tried two things :

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

and
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 !

Logged
sui
Guest
« Reply #21 on: 23 Apr '10 - 10:08 »
Reply with quoteQuote

Ok, I just fixed it...

Call

BASS_Init(-1,44100,0,NULL,NULL);

BEFORE

UInt32 sessionCategory = kAudioSessionCategory_MediaPlayback;
AudioSessionSetProperty (kAudioSessionProperty_AudioCategory,  sizeof (sessionCategory), &sessionCategory);

And not after... It's better !

Thanks Smiley
Logged
ken
Posts: 630


« Reply #22 on: 23 Apr '10 - 11:49 »
Reply with quoteQuote

Ok, I just fixed it...

Thanks Smiley


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.

Logged
Ian @ un4seen
Administrator
Posts: 15269


« Reply #23 on: 23 Apr '10 - 16:55 »
Reply with quoteQuote

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).
Logged
sui
Guest
« Reply #24 on: 27 Apr '10 - 08:59 »
Reply with quoteQuote

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.
Logged
Jon Schøpzinsky
Guest
« Reply #25 on: 27 Apr '10 - 21:31 »
Reply with quoteQuote

Ive been trying to use the Bass.Net.dll with monotouch for some time now, and everytime i use a part of the Bass.Net SDK, the build fails with "mtouch failed with no output".

Could anyone enlighten me, with how i get this working on MonoTouch?

Ive linked the needed library and frameworks, but it still fails.

/Jon
Logged
ken
Posts: 630


« Reply #26 on: 28 Apr '10 - 07:08 »
Reply with quoteQuote

Ive been trying to use the Bass.Net.dll with monotouch for some time now, and everytime i use a part of the Bass.Net SDK, the build fails with "mtouch failed with no output".

Could anyone enlighten me, with how i get this working on MonoTouch?

Ive linked the needed library and frameworks, but it still fails.

/Jon

For now you can't use Bass.Net with Monotouch, there are dependencys like Drawing.Image that Monotouch don't support. But Bernd is working on a iPhone version, with most fatures that works for iPhone.

/Ken
Logged
Jon Schøpzinsky
Guest
« Reply #27 on: 28 Apr '10 - 10:07 »
Reply with quoteQuote

Ah, that explains it  Smiley

Well, then ill be looking forward to it being released. Is there any (im a developer myself so i cant believe im asking...) estimate on when its done?

/Jon
Logged
radio42
Posts: 4012


« Reply #28 on: 28 Apr '10 - 12:01 »
Reply with quoteQuote

It is actually being done ;-)

You can get a pre-version here:
    www.un4seen.com/filez/4/Bass.Net.iphone.zip

Note, that the iphone version has the following limitations:
a) no picture tag reading support
b) no WaveForm rendering support

The Bass.Net iphone version already has support for:
- BASS
- BASSFLAC
- BASSMIDI
- BASSWV
- BASSmix
- BASS_AAC (which is not yet available from Ian, but might be soon)
- BASS_FX (which is not yet available from Jobby, but might be soon)
Logged
Jon Schøpzinsky
Guest
« Reply #29 on: 28 Apr '10 - 12:05 »
Reply with quoteQuote

Now, that was good news  Wink

I will try it right away.
Is there anywhere you want bugs reported and such?

Jon
Logged
ken
Posts: 630


« Reply #30 on: 11 May '10 - 14:16 »
Reply with quoteQuote

It is actually being done ;-)

You can get a pre-version here:
    www.un4seen.com/filez/4/Bass.Net.iphone.zip



When using ChannelSync for reading Meta tags, my app crash on the iPhone device but works just fine in the simulator.

I set sync like this:
mySync = new SYNCPROC(MetaSync);
Bass.BASS_ChannelSetSync(_stream, BASSSync.BASS_SYNC_META, 0, mySync, IntPtr.Zero);

and get meta data like this:
private void MetaSync(int handle, int channel, int data, IntPtr user)
{
       
  TAG_INFO tags = new TAG_INFO();


  if (tags.UpdateFromMETA(Bass.BASS_ChannelGetTags(_stream, BASSTag.BASS_TAG_META), false, true))
  {

          _NetStreamEventArgs.Artist = tags.artist;
          _NetStreamEventArgs.Title = tags.title;
                   
    }
           
 }


The app crash on "Bass.BASS_ChannelSetSync", here is the debug info I get from Monotouch
Quote
Unhandled Exception: System.ExecutionEngineException: Attempting to JIT compile method '(wrapper native-to-managed) CasterPlay.AudioEngine:MetaSync (int,int,int,intptr)' while running with --aot-only.

  at (wrapper managed-to-native) Un4seen.Bass.Bass:BASS_ChannelSetSync (int,Un4seen.Bass.BASSSync,long,Un4seen.Bass.SYNCPROC,intptr)


I can read tags "manually" like this (but then I need a timer to pull the data..

TAG_INFO  _tagInfo = new TAG_INFO(URL);

if (BassTags.BASS_TAG_GetFromURL(_stream, _tagInfo))
 {

      _NetStreamEventArgs.Artist = _tagInfo.artist;
       _NetStreamEventArgs.Title = _tagInfo.title;
}
         

Is is Bass, Bass.Net or me...?


/Ken
Logged
radio42
Posts: 4012


« Reply #31 on: 17 May '10 - 09:34 »
Reply with quoteQuote

Sounds this could be related to an AOT (ahead-of-time compilation) issue with mono?
Did you to to NOT use AOT?
And did you try to use a static SYNCPROC instead of a private method?

I'm unable to reproduce this, as I don't have a Mac...
Logged
MikaelS
Posts: 88


« Reply #32 on: 22 May '10 - 10:26 »
Reply with quoteQuote

When I try to build a test project using BASS for iPhone, the compiler gives me the following warning message:
ld: warning: in /Users/mikael/Documents/BASSTest/basslib/libbass.a, file was built for unsupported file format which is not the architecture being linked (i386)

My application is a "clean" View Based iPhone application with no code added.
The only think I did as to add libbass.a into "Targets > BASSTest > Link Binary With Libraries" node.

It does not matter if I take the libbass.a file from the root folder or from the "Simulator" folder.

Any ideas? A working example project would be nice Smiley

Thanks in advance!

Edit: I'm using (have added) the bass.h file from the OSX setup to my project.
If I do not include this file (#import "bass.h") I do not get the warning. Help!
« Last Edit: 22 May '10 - 11:23 by MikaelS » Logged
MikaelS
Posts: 88


« Reply #33 on: 23 May '10 - 09:29 »
Reply with quoteQuote

Nevermind my prior post.. It was XCode mixing things up Wink
Logged
MikaelS
Posts: 88


« Reply #34 on: 26 May '10 - 17:11 »
Reply with quoteQuote

What should be used to set the device general output volume with BASS for iPhone?

Can "BASS_SetConfig(BASS_CONFIG_GVOL_STREAM, XXX);" be used or do I need to use AVAudioSession property?

Please help!

Thanks in advance.
Logged
ken
Posts: 630


« Reply #35 on: 26 May '10 - 22:21 »
Reply with quoteQuote

What should be used to set the device general output volume with BASS for iPhone?

You have to use "MPVolumeView" in iPhone SDK, this class will give you a slider that controls volume and are "connected" to the volume buttons on the iPhone. Not that The volumeslider will not show in simulator, only shows on a iPhone device.  MPVolumeView doc: http://bit.ly/blzs6w


Logged
MikaelS
Posts: 88


« Reply #36 on: 27 May '10 - 09:36 »
Reply with quoteQuote

Thanks for the reply Ken, it works like a charm Smiley
Logged
George
Posts: 13


« Reply #37 on: 28 May '10 - 12:55 »
Reply with quoteQuote

BASS for iPhoneOS is really great.

There seams to be a small bug. When VoiceOver (for blind people) is activated, there will be no sound from BASS on iPhoneOS.
Settings-->General-->Accessibility-->VoiceOver.

VoiceOver is in iPhone 3GS, iPad and latest iPod Touch.

It happens on all this devices...

Probably a device sharing issue?
Logged
Ian @ un4seen
Administrator
Posts: 15269


« Reply #38 on: 28 May '10 - 15:41 »
Reply with quoteQuote

I don't see that option on my test device or the simulator, so I can't try it at the moment, but I'll send you a debug version to get some info.
Logged
George
Posts: 13


« Reply #39 on: 1 Jun '10 - 05:44 »
Reply with quoteQuote

Hi Ian

The VoiceOver option is on iPhone 3GS, iPad and probably latest iPod Touch...

Probably you have iPhone 3G.

I did not received debug version. Please send with advice how to debug.

Regards

Logged
Pages: 1 [2] 3 4 ... 36
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines