santa-clause Posted April 11, 2013 Author Share Posted April 11, 2013 **THERE IS A BAD FILE ERROR IN THIS CODE SO PLEASE DON'T USE IT UNTIL I FIXED THAT ERROR!!****USE ERWINS TUTORIAL INSTEAD THAT ONE WORKS ![;)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/wink.png)**[http://www.touchofde…rom-csde-in-eo/](http://www.touchofdeathforums.com/community/index.php?/topic/122847-eo-add-music-system-from-csde-in-eo/)All the credits go to Robin for the making of FMOD for crystalshire.And credits to Sephir0th for the making of clsFMOD.clsOk to start simply download the attachment and add it to you're projectAlso add FMOD.dll from the attachment.**ALL CLIENT SIDE**Find Private Sub cmdPlay_Click() and Private Sub cmdStop_Click()and replace all of that with this:```Private Sub cmdPlay_Click()' If debug mode, handle error then exit outIf Options.Debug = 1 Then On Error GoTo errorhandlerFMOD.Music_StopFMOD.Music_Play lstMusic.List(lstMusic.ListIndex)' Error handlerExit Suberrorhandler:HandleError "cmdPlay_Click", "frmEditor_MapProperties", Err.Number, Err.Description, Err.Source, Err.HelpContextErr.ClearExit SubEnd SubPrivate Sub cmdStop_Click()' If debug mode, handle error then exit outIf Options.Debug = 1 Then On Error GoTo errorhandlerFMOD.Music_Stop' Error handlerExit Suberrorhandler:HandleError "cmdStop_Click", "frmEditor_MapProperties", Err.Number, Err.Description, Err.Source, Err.HelpContextErr.ClearExit SubEnd Sub```Find```If Len(Trim$(Options.MenuMusic)) > 0 Then PlayMidi Trim$(Options.MenuMusic)```And replace it whit:```If Len(Trim$(Options.MenuMusic)) > 0 Then FMOD.Music_Play Trim$(Options.MenuMusic)```Find(In Sub GameInit()):```'stop the song playingStopMidi```Replace that whit this:```' play musicDim MusicFile As StringMusicFile = Trim$(Map.Music)If Not MusicFile = "None." Then FMOD.Music_Play MusicFileElse FMOD.Music_StopEnd If```Find (In Public Sub DestroyGame()):```Call DestroyTCP```After That add:```' destroy music & sound enginesFMOD.Destroy```In Private Sub HandleMapDone():Replace:```MusicFile = Trim$(Map.Music)If Not MusicFile = "None." Then PlayMidi MusicFileElse StopMidiEnd If```Whit:```' player music MusicFile = Trim$(Map.Music) If Not MusicFile = "None." Then FMOD.Music_Play MusicFile Else FMOD.Music_Stop End If```Replace all the:```PlaySound Sound_Buttonclick```With this:```FMOD.Sound_Play Sound_Buttonclick```In Private Sub optMOn_Click()Replace:```' start music playingMusicFile = Trim$(Map.Music)If Not MusicFile = "None." Then PlayMidi MusicFileElse StopMidiEnd If```whit:```' start music playingMusicFile = Trim$(Map.Music)If Not MusicFile = "None." Then FMOD.Music_Play MusicFileElse FMOD.Music_StopEnd If```And in Private Sub optMOff_Click()Replace```StopMidi```Whit:```FMOD.Music_Stop```Find:```PlaySound Sound_ButtonHover```And replace all of them whit:```FMOD.Sound_Play Sound_ButtonHover```In Public Sub PlayMapSound:Replace:```' play the soundPlaySound soundName```Whit:```' play the soundFMOD.Sound_Play soundName```Add this to ModConstants:```' Constants for FMOD tutorial by SantaPublic Const Sound_ButtonHover As String = "Cursor1.wav"Public Const Sound_Buttonclick As String = "Click.wav"```In modglobals after:```Option Explicit```add:```'******************************************************'This is base object decalaration for FMOD sound engine TUT by santaPublic FMOD As New clsFMOD'******************************************************```In Sub GameLoop find:```StopMidi PlayMidi Options.MenuMusic```And replace it with:```FMOD.Music_Stop FMOD.Music_Play Options.MenuMusic```In Sub MainReplace:```' load music/sound engineInitSoundInitMusic```With this:```' initialise sound & music enginesFMOD.Init```Replace the hole Private Sub HandlePlayBGMwith:```Private Sub HandlePlayBGM(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)Dim Buffer As clsBufferDim str As String' If debug mode, handle error then exit outIf Options.Debug = 1 Then On Error GoTo errorhandlerSet Buffer = New clsBufferBuffer.WriteBytes Data()str = Buffer.ReadStringFMOD.Music_StopFMOD.Music_Play strSet Buffer = Nothing' Error handlerExit Suberrorhandler:HandleError "HandlePlayBGM", "modHandleData", Err.Number, Err.Description, Err.Source, Err.HelpContextErr.ClearExit SubEnd Sub```That's it normally now you have succesfully installed FMOD ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png)If you find any bugs then just ask how to fix it because this is working perfectly on my engine ![;)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/wink.png)PAY ATTENTION:its not playing the sound on debug mode…So copile the client then can you hear the sounds … Link to comment Share on other sites More sharing options...
tslusny Posted April 11, 2013 Share Posted April 11, 2013 There is already FMOD tut somewhere on this forums… Link to comment Share on other sites More sharing options...
santa-clause Posted April 11, 2013 Author Share Posted April 11, 2013 > There is already FMOD tut somewhere on this forums…Really i only found a BASS tutorial Link to comment Share on other sites More sharing options...
Wortel Angels Posted April 11, 2013 Share Posted April 11, 2013 You maybe need to say its not playing the sound on debug mode…So copile the client then can you hear the sounds ... Link to comment Share on other sites More sharing options...
santa-clause Posted April 11, 2013 Author Share Posted April 11, 2013 Ok i'll add it right away ![;)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/wink.png) Link to comment Share on other sites More sharing options...
Socgreaser Posted April 11, 2013 Share Posted April 11, 2013 Woot, nice red text mate. ![](http://nobodys-perfect.com/vtpm/awards/useless_award.gif) Link to comment Share on other sites More sharing options...
boyesjs03 Posted April 11, 2013 Share Posted April 11, 2013 Could someone explain what FMOD is to me please? Link to comment Share on other sites More sharing options...
Zopto Posted April 11, 2013 Share Posted April 11, 2013 whit fmod you can play any kind of music ,,,mp3,mp4,ogg, etc….Erwins music system[http://www.touchofdeathforums.com/community/index.php?/topic/122847-eo-add-music-system-from-csde-in-eo/](http://www.touchofdeathforums.com/community/index.php?/topic/122847-eo-add-music-system-from-csde-in-eo/) Link to comment Share on other sites More sharing options...
boyesjs03 Posted April 11, 2013 Share Posted April 11, 2013 Right ![;)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/wink.png) Link to comment Share on other sites More sharing options...
Guest Posted April 11, 2013 Share Posted April 11, 2013 Are you people still trying to get FMOD to work? It's broken as hell and doesn't offer nearly as much as BASS. Link to comment Share on other sites More sharing options...
tslusny Posted April 11, 2013 Share Posted April 11, 2013 > Are you people still trying to get FMOD to work? It's broken as hell and doesn't offer nearly as much as BASS.But with BASS you must use also bassmidi to get something that trivial like playing midis to work. And becouse many people prefer midis above MP3s and OGGs becouse of filesize (like me, i am using MP3 only sometimes, otherwise i am using mainly midis for music becouse i do not want that my game will be +100MB in size just becouse of music) Link to comment Share on other sites More sharing options...
Guest Posted April 11, 2013 Share Posted April 11, 2013 > But with BASS you must use also bassmidi to get something that trivial like playing midis to work. And becouse many people prefer midis above MP3s and OGGs becouse of filesize (like me, i am using MP3 only sometimes, otherwise i am using mainly midis for music becouse i do not want that my game will be +100MB in size just becouse of music)People who prefer .midi over .mp3, .ogg, .flac, etc have massive problems. Link to comment Share on other sites More sharing options...
tslusny Posted April 11, 2013 Share Posted April 11, 2013 > People who prefer .midi over .mp3, .ogg, .flac, etc have massive problems.People who wanna have Eclipse game with size above 100MB aren´t normal too. And why? It is like comparing LPs with CDs. And who are saying about people who are listening to LPs that they are idiots? Noone. Link to comment Share on other sites More sharing options...
Guest Posted April 11, 2013 Share Posted April 11, 2013 > People who wanna have Eclipse game with size above 100MB have massive problems.It's not the dark ages. People can download over 100mb now without caring. Link to comment Share on other sites More sharing options...
tslusny Posted April 11, 2013 Share Posted April 11, 2013 > It's not the dark ages. People can download over 100mb now without caring.But that type of peoples will rather download Unreal Tournament ![:D](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/biggrin.png) Link to comment Share on other sites More sharing options...
TheRexion Posted April 12, 2013 Share Posted April 12, 2013 > But that type of peoples will rather download Unreal TournamentIncorrect. I use myself as an example. Link to comment Share on other sites More sharing options...
santa-clause Posted April 12, 2013 Author Share Posted April 12, 2013 > Are you people still trying to get FMOD to work? It's broken as hell and doesn't offer nearly as much as BASS.For bass you need a license and i'm not going to use illegal stuff Link to comment Share on other sites More sharing options...
santa-clause Posted April 12, 2013 Author Share Posted April 12, 2013 > Woot, nice red text mate. ![](http://nobodys-perfect.com/vtpm/awards/useless_award.gif)I'm doing something wrong because the error is that it can't find the hover button file can someone please help me find the error? 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