GLBasic forum

Main forum => GLBasic - en => Topic started by: gregbug on 2009-Dec-31

Title: iphone vibration...
Post by: gregbug on 2009-Dec-31
iphone vibration is possible in glbasic? 

how can i call an sdk api? is possible ?

thanks.  =D
Title: Re: iphone vibration...
Post by: trucidare on 2009-Dec-31
i send gernot the code long time ago before v7 released. Think he has implemented this.
Title: Re: iphone vibration...
Post by: Kitty Hello on 2010-Jan-04
FORCEFEEDBACK - untested, but should work.
Title: Re: iphone vibration...
Post by: gregbug on 2010-Jan-04
Quote from: Kitty Hello on 2010-Jan-04
FORCEFEEDBACK - untested, but should work.

wooooowwww  =D
now i'm on work when i go home i'll test and report if work!  8)

thanks again!.

PS: i there a tutorial or an example on how to interface glbasic with " objective C" for iphone direct api call?

thanks.
Title: Re: iphone vibration...
Post by: gregbug on 2010-Jan-04
ok. tested on my iPhone 3GS
works.!

but "FORCEFEEDBACK nJoy#, duration#, x_motor#, y_motor#"

duration# is always the same...  :(
i try 1, 10, 20, 50 millisecs but the vibration it's always about 0.4 second...

it's possible to correct this ?

i searched on iphone api but seems that "AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);" do not allow to specify the duration...

any help?
thanks again...
Title: Re: iphone vibration...
Post by: Hatonastick on 2010-Jan-04
If duration cannot be specified then I guess you are going to have to make a function that calls it repeatedly -- probably from your main game loop.  No idea how well it would work, but don't see any other option unless there's another call in the API that allows you to set a duration.
Title: Re: iphone vibration...
Post by: Kitty Hello on 2010-Jan-04
Yes - I have to spawn a thread for that. Sorry. So far I just rumble once.