Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[EO] Adding Mp3 support to EO - VERY BASIC


damian666
 Share

Recommended Posts

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 xd

anyway, 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 xd

let 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  ;)

Dami

PS. 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

  • Replies 109
  • Created
  • Last Reply

Top Posters In This Topic

  • 2 weeks later...
@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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


×
×
  • Create New...