damian666 Posted January 27, 2011 Author Share Posted January 27, 2011 Here we go, this will add very basic mp3 support to Eo.its so basic, it only works for map music, and its not utalizing any of the buildin sound systems … yet I hope xdanyway, lets start shall we ^^First download the 2 attachments, and put them in the src folder of the client, overwrite the one allready there.Then add the files to the project, by clicking in project browser on the right side, and choose add> existing file, and add modDxShow.now go to Project>references and add a ref to active movie control type library.Now in modGeneral, in Public sub PopulateLists, look for :```' music in map properties frmEditor_MapProperties.lstMusic.Clear frmEditor_MapProperties.lstMusic.AddItem "None." strLoad = Dir(App.Path & MUSIC_PATH & "*.mid") Do While strLoad > vbNullString frmEditor_MapProperties.lstMusic.AddItem strLoad strLoad = Dir Loop```after that, add :Fix by Anthony:``` strLoad = Dir(App.Path & MUSIC_PATH & "*.mp3") Do While strLoad > vbNullString ReDim Preserve musicCache(1 To i) As String musicCache(i) = strLoad strLoad = Dir i = i + 1 Loop```this will make sure the mp3 files are found so they show up in mapeditor.then, in modGameLogic, look for :```' Calculate fps If TickFPS < Tick Then GameFPS = FPS TickFPS = Tick + 1000 FPS = 0 Else FPS = FPS + 1 End If```after that, add :```'loop mapmusic if needed and its a mp3 file LoopMp3```That should be it, if I didnt forget anything xdlet me know what ya think, and if it worked for ya.Note to robin, if ya have pointers to include it in your soundsystem, im open for suggestions, EO is still very new for me >.<im trying to de-learn Stable coding ;)DamiPS. the class I used I found on the internet, its not mine, I just made it work with EO.edited for something I forgot xd Link to comment Share on other sites More sharing options...
Fulier Posted January 27, 2011 Share Posted January 27, 2011 DS_GetDuration ? Link to comment Share on other sites More sharing options...
damian666 Posted January 27, 2011 Author Share Posted January 27, 2011 just stuff thats not implemented yet, dont worry about it xdunless its a error msg, which i doubt…Dami Link to comment Share on other sites More sharing options...
Fulier Posted January 27, 2011 Share Posted January 27, 2011 may be mp3_GetDuration? Link to comment Share on other sites More sharing options...
damian666 Posted January 27, 2011 Author Share Posted January 27, 2011 nvm, i see what ya mean, ill upload a fixed version, i forgot i renamed them at the last second xdmy bad :PDami Link to comment Share on other sites More sharing options...
damian666 Posted January 27, 2011 Author Share Posted January 27, 2011 there, uploaded the new one with correct naming >.<sorry about that, i never should have done that in the morning anyway xd Link to comment Share on other sites More sharing options...
erkro1 Posted January 27, 2011 Share Posted January 27, 2011 I get compile error when adding code in eo xmas.Compile Error :User-defined type not definedHe's selecting this code :```m_objBasicAudio As IBasicAudio``` Link to comment Share on other sites More sharing options...
damian666 Posted January 27, 2011 Author Share Posted January 27, 2011 ```now go to Project>references and add a ref to active movie control type library.```added that? Link to comment Share on other sites More sharing options...
erkro1 Posted January 27, 2011 Share Posted January 27, 2011 Sorry forgot that :embarrassed:It works, thanks :cheesy: Link to comment Share on other sites More sharing options...
damian666 Posted January 27, 2011 Author Share Posted January 27, 2011 :p no probs ^^Dami Link to comment Share on other sites More sharing options...
erkro1 Posted January 27, 2011 Share Posted January 27, 2011 Hmm… how i can add it in eo xmas? Link to comment Share on other sites More sharing options...
damian666 Posted January 27, 2011 Author Share Posted January 27, 2011 should not work that much different…unless there is no sound system?Dami Link to comment Share on other sites More sharing options...
Robin Posted January 27, 2011 Share Posted January 27, 2011 @erkro1:> Hmm… how I can add it in eo xmas?The exact same way. Link to comment Share on other sites More sharing options...
coolmagicdude2 Posted January 30, 2011 Share Posted January 30, 2011 Oh nice! I was going for a way more complicated approach. I tend to think too hard about things xD Nice one. Link to comment Share on other sites More sharing options...
damian666 Posted January 30, 2011 Author Share Posted January 30, 2011 im sure there are way better ways to do it actually, im sure robin could do it much better xdbut hee, it works ^^Dami Link to comment Share on other sites More sharing options...
dthnote801 Posted February 4, 2011 Share Posted February 4, 2011 It looks pretty good to me Dami.Edit: I got it now..Edit Edit: When I run it with a .mp3 song, EO freezes. Link to comment Share on other sites More sharing options...
damian666 Posted February 5, 2011 Author Share Posted February 5, 2011 just tested it on latest EO, works fine mate, sure you followed everything?dami Link to comment Share on other sites More sharing options...
dthnote801 Posted February 5, 2011 Share Posted February 5, 2011 Indeed, I think it might have been the songs, because I'm trying some different .mp3s now, and it's working smoothly.So Thanks for this, it's great. :D Link to comment Share on other sites More sharing options...
damian666 Posted February 5, 2011 Author Share Posted February 5, 2011 your welcome ^^dami Link to comment Share on other sites More sharing options...
JSchilli1 Posted February 5, 2011 Share Posted February 5, 2011 Isn't MP3 proprietary?-JS1 Link to comment Share on other sites More sharing options...
damian666 Posted February 5, 2011 Author Share Posted February 5, 2011 yeah so? do i look like i care? xddami Link to comment Share on other sites More sharing options...
JSchilli1 Posted February 5, 2011 Share Posted February 5, 2011 Haha, nope, not a bit!Anyways, good tutorial!-JS1 Link to comment Share on other sites More sharing options...
saruish Posted February 11, 2011 Share Posted February 11, 2011 ~~seems not to be working for me …hmmm~~never mind i got it working. tho i had to sacrifice my midi code. Link to comment Share on other sites More sharing options...
Dase Posted February 19, 2011 Share Posted February 19, 2011 @Dami:> Now in modGeneral, in Public sub PopulateLists, look for :> > ```> ' music in map properties> frmEditor_MapProperties.lstMusic.Clear> frmEditor_MapProperties.lstMusic.AddItem "None."> strLoad = Dir(App.Path & MUSIC_PATH & "*.mid")> Do While strLoad > vbNullString> frmEditor_MapProperties.lstMusic.AddItem strLoad> strLoad = Dir> Loop> > ```> after that, add :> > ```> strLoad = Dir(App.Path & MUSIC_PATH & "*.mp3")> Do While strLoad > vbNullString> frmEditor_MapProperties.lstMusic.AddItem strLoad> strLoad = Dir> Loop> > ```> this will make sure the mp3 files are found so they show up in mapeditor.I can't find " ' music in map properties " in EO 2.0 ; / Link to comment Share on other sites More sharing options...
damian666 Posted February 19, 2011 Author Share Posted February 19, 2011 yeah, i have to update this for latest version.ill do it soon :)Dami Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now