[iPhone] GLBMusic

Previous topic - Next topic

trucidare

Hi there,

now the possibility to play musik in your application.

8 Steps to luck:

1. -> Download the lib and gbas from: http://davis.org.au/trucidare/GLBMusic.zip
2. -> Add GLBMusic.gbas to your Project
3. -> Use functions to add Music support and compile
4. -> copy to mac
5. -> open xcode project
6. -> drag and drop libGLBMusic.a to frameworks on the left side (dont forget to add MediaPlayer.framework, thats missing in the glbasic xcode project, simple right click on frameworks add-> existing frameworks -> choose mediaplayer and click ok)
7. -> edit info.plist
8. -> compile and have fun.

issues:
- Statusbar is not shown - fixed
- on close the MediaPicker flickered for a second - fixed


have fun and let me know whats wrong and which functions are missing

regards
-trucidare

sample code:

Code (glbasic) Select
// --------------------------------- //
// Project: MusicTest
// Start: Monday, February 08, 2010
// IDE Version: 7.250

//SETCURRENTDIR("Media") // seperate media and binaries?

AUTOPAUSE FALSE
LIMITFPS -1

Menu()

WHILE TRUE
SHOWSCREEN
WEND

FUNCTION foo:
ENDFUNCTION

FUNCTION Menu:
pressed = 0
stat = 0
LOADSPRITE "Media/choose.bmp",0
LOADSPRITE "Media/play.bmp",1

WHILE TRUE
DRAWSPRITE 0,50,40
DRAWSPRITE 1,50,90

MOUSESTATE mx,my,b1,b2
IF b1 = 0 THEN pressed = 0

PRINT "Hello World!",0,0
PRINT "isPlaying: "+GLB_MP_isPlaying(),0,10

IF BOXCOLL(50,40,143,39,mx,my,1,1) AND b1 AND pressed = 0
GLB_MP_StartMusicPlayer()
pressed = 1
ENDIF

IF BOXCOLL(50,90,143,39,mx,my,1,1) AND b1 AND pressed = 0
GLB_MP_PlayMusic()
pressed = 1
ENDIF

SHOWSCREEN
WEND
ENDFUNCTION


MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC

fjsantosb

I can't believe trucidare!
I coming here to report agon, and you have finish 'play custom music' wrapper.
Really impressive work!

I will test inmmediatly.

King Regards, fjsantos.



Francisco Santos Belmonte founder of Tip Tap Games.
Website: www.tiptapgames.com
Twitter: www.twitter.com/tiptapgames
Facebook: http://dld.bz/dYVd
iPhone News & Sales: www.gamesappetizer.com

fjsantosb

Hi trucidare,
I have a little question about that.
Can i use a lib compiled by a user. Please correct me if i am worng but I think that apple don't let to use this knid of libs.

Can anyone confirm that?

King Regards, fjsantos.
Francisco Santos Belmonte founder of Tip Tap Games.
Website: www.tiptapgames.com
Twitter: www.twitter.com/tiptapgames
Facebook: http://dld.bz/dYVd
iPhone News & Sales: www.gamesappetizer.com

trucidare

The lib is official compiled with apple sdk and static cocoa lib template. i can release sources that can be implemented in xcode projects but isnt the easiest way i think.
but yes you can use it. cocos2d is a user lib too and there are some games in appstore.
MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC

fjsantosb

Hi there,

Great then! I am currently testing! I will post feedback as soon i finish test!

King Regards, fjsantos.
Francisco Santos Belmonte founder of Tip Tap Games.
Website: www.tiptapgames.com
Twitter: www.twitter.com/tiptapgames
Facebook: http://dld.bz/dYVd
iPhone News & Sales: www.gamesappetizer.com

codegit

Nice, what else can be said. Once again awesome. Thank you for your contributions of cool libs for the iPhone.  :good:
------------------------------------------
1 X Acer TravelMate 4270, laptop, XP PRO
1 X Dell Studio 17 laptop, Windows 7
1 X MacBook Pro 2,2 GHz Core 2 Duo, 2 GB RAM, 160 GB HDD, 9400M
2 X iTouch
1 X HTC Desire (Android 2.1)
iPad soon to be added

codegit

I was thinking, maybe the moderators would allow an area on the forum for all the extensions that are being added to the iPhone. Just a thought.  ;) It would be nice if all the iPhone specific stuff was kept in an easy to find area.  8)
------------------------------------------
1 X Acer TravelMate 4270, laptop, XP PRO
1 X Dell Studio 17 laptop, Windows 7
1 X MacBook Pro 2,2 GHz Core 2 Duo, 2 GB RAM, 160 GB HDD, 9400M
2 X iTouch
1 X HTC Desire (Android 2.1)
iPad soon to be added

trucidare

i Want your Macbook Uni codegit :D
MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC

fjsantosb

Hi trucidare,

After all, yesterday i couldn't complete the test of the lib.
I am currently completing the testing now.

King Regards, fjsantos.
Francisco Santos Belmonte founder of Tip Tap Games.
Website: www.tiptapgames.com
Twitter: www.twitter.com/tiptapgames
Facebook: http://dld.bz/dYVd
iPhone News & Sales: www.gamesappetizer.com

fjsantosb

Ok, i have complete the test, and seems to work pretty well!!

Only a few details.
- When open player, not fill all screen (I suppose that on upper side its must show iPhone / iPod state bar?).
- Player can be rotated?
- When close application, player blinds for a second (Must be closed by code before close the application to avoid to blind player?).

That's all for now! (I will continue testing).

Thanks again for sharing your work trucidare!

King Regards, fjsantos.
Francisco Santos Belmonte founder of Tip Tap Games.
Website: www.tiptapgames.com
Twitter: www.twitter.com/tiptapgames
Facebook: http://dld.bz/dYVd
iPhone News & Sales: www.gamesappetizer.com

trucidare

oh not seen the bar thing :D had a silverbackground window. Check this.

you mean the picker? i can check if this available.
ok i check the close function. but i remove the view from superview


thanks for testing
MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC

fjsantosb

Hi there,

The status bar will be great to show (to get uniformity).
About rotate thing (i think it's not possible, isn't it).
Close player, will be great too (to avoid bliding).

About the picker, what's the picker?

King Regards, fjsantos.
Francisco Santos Belmonte founder of Tip Tap Games.
Website: www.tiptapgames.com
Twitter: www.twitter.com/tiptapgames
Facebook: http://dld.bz/dYVd
iPhone News & Sales: www.gamesappetizer.com

trucidare

the picker is the list thingy you see if you start the musicplayer. Where you can choose your music.

MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC

trucidare

hey updated the archive now. statusbar is now there and the flicker on close is gone.

rotate is not possible until i create a complete new controller. sorry
MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC

fjsantosb

Hi Trucidare!

Great!! I will test inmediatelly.
I don't care too much about orientation, cause is a iPhone Component.

I will send you feedback when tested.

Great Work!

King Regards, fjsantos.
Francisco Santos Belmonte founder of Tip Tap Games.
Website: www.tiptapgames.com
Twitter: www.twitter.com/tiptapgames
Facebook: http://dld.bz/dYVd
iPhone News & Sales: www.gamesappetizer.com