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.zip2. -> 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:
// --------------------------------- //
// 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