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

In modGeneral, PopulateList

Just put this in.. And it'll work for EO 2.0 leaving everything else the same. (Won't even have to sacrifice .mid files)

```
        strLoad = Dir(App.Path & MUSIC_PATH & "*.mp3")
    I = I
    Do While strLoad > vbNullString
        ReDim Preserve musicCache(1 To I) As String
        musicCache(I) = strLoad
        strLoad = Dir
        I = I + 1
    Loop
```
Link to comment
Share on other sites

  • Replies 109
  • Created
  • Last Reply

Top Posters In This Topic

@n00b:

> In modGeneral, PopulateList
>
> Just put this in.. And it'll work for EO 2.0 leaving everything else the same. (Won't even have to sacrifice .mid files)
>
> ```
>         strLoad = Dir(App.Path & MUSIC_PATH & "*.ogg")
>     I = I
>     Do While strLoad > vbNullString
>         ReDim Preserve musicCache(1 To I) As String
>         musicCache(I) = strLoad
>         strLoad = Dir
>         I = I + 1
>     Loop
> ```

This is not working for me, it wont even play midis now.
Link to comment
Share on other sites

@n00b:

> In modGeneral, PopulateList
>
> Just put this in.. And it'll work for EO 2.0 leaving everything else the same. (Won't even have to sacrifice .mid files)
>
> ```
>         strLoad = Dir(App.Path & MUSIC_PATH & "*.ogg")
>     I = I
>     Do While strLoad > vbNullString
>         ReDim Preserve musicCache(1 To I) As String
>         musicCache(I) = strLoad
>         strLoad = Dir
>         I = I + 1
>     Loop
> ```

Yeah this didn't work for me either, though my Mid files still played..
Link to comment
Share on other sites

@n00b:

> In modGeneral, PopulateList
>
> Just put this in.. And it'll work for EO 2.0 leaving everything else the same. (Won't even have to sacrifice .mid files)
>
> ```
>         strLoad = Dir(App.Path & MUSIC_PATH & "*.ogg")
>     I = I
>     Do While strLoad > vbNullString
>         ReDim Preserve musicCache(1 To I) As String
>         musicCache(I) = strLoad
>         strLoad = Dir
>         I = I + 1
>     Loop
> ```
> EDIT: Didn't know I would need a license though haha I shoulda read the whole thread. opps..

I still don't have my mp3's in Music List (Map Properies).
Link to comment
Share on other sites

Changing the damn file extension to .ogg isn't going to do anything at all. I don't think DirectShow even supports OGG natively.

I suggest you go read the mp3 license and realise that you're acting like a real idiot right now. Releasing a source code edit isn't bound to their license, the license applies to anyone who releases a game with this system in their source code.

Listening to some kids talking about things they don't understand isn't the greatest idea ever. JS1 is like 12 years old and doesn't understand the basics of the law. Do your own research in the future.
Link to comment
Share on other sites

@n00b:

> It's not a simple copy/paste if you want mp3\. I changed it to .ogg cause I'm skurred and stuff lol.

Of course it's not.

Listen, i have one more question. How to do all of that stuff from first post in this topic to have correctly working mp3 files in game? It works for main menu, maps too, but i can't choose them in map editor.
Link to comment
Share on other sites

@Robin:

> Changing the damn file extension to .ogg isn't going to do anything at all. I don't think DirectShow even supports OGG natively.
>
> I suggest you go read the mp3 license and realise that you're acting like a real idiot right now. Releasing a source code edit isn't bound to their license, the license applies to anyone who releases a game with this system in their source code.
>
> Listening to some kids talking about things they don't understand isn't the greatest idea ever. JS1 is like 12 years old and doesn't understand the basics of the law. Do your own research in the future.

Actually Rithy pointed it to me, and Sekaru also warned me on it. I was gonna put it in my mod for release but after being told, I refrained from it, course I should just go read the licensing myself but I'm not a reader.

Also I did find out .ogg wasn't gonna do shit but I was gone for the weekend and didn't have the time to modify the post.. Will do now though.
Link to comment
Share on other sites

Well,

I did all the source edits that I was supposed to do.
And each time I hit "Make blah.exe" it just keeps saying:

"Compile Error! Method or data not found!"
This is the line it highlights :
frmMain.txtChat.SelStart = Len(frmMain.txtChat.text)

I downloaded a new copy of EO, just so I could test this. The only
things Ive edited thus far are the game link, name, MOTD, party max member size
and then the source edits for this thread. So, why would this line light up? It's keeping
me from my compiling the .exe no matter what. I added the reference and the new .bas file.

.___.

-Viral.

//Edit: Downloaded fresh copy. Edited nothing. Still run into the same error.
Link to comment
Share on other sites

@erkro1:

> I get compile error when adding code in eo xmas.
> Compile Error :
> User-defined type not defined
>
> He's selecting this code :
> ```
> m_objBasicAudio As IBasicAudio
> ```

So I have the same error, I've also added the reference, I followed it as well as I could.

Do you have a link for a tutorial that also plays mp3 on the main menu aswell as on map tiles?
Link to comment
Share on other sites

In case anyone is interested, I've gotten it to work by changing this part of the tutorial:
```
    strLoad = Dir(App.Path & MUSIC_PATH & "*.mp3")
    Do While strLoad > vbNullString
      frmEditor_MapProperties.lstMusic.AddItem strLoad
      strLoad = Dir
    Loop

```To this:
```
    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

```
In the latest version of EO
Link to comment
Share on other sites

@Anŧhøñy:

> In case anyone is interested, I've gotten it to work by changing this part of the tutorial:
> ```
>     strLoad = Dir(App.Path & MUSIC_PATH & "*.mp3")
>     Do While strLoad > vbNullString
>       frmEditor_MapProperties.lstMusic.AddItem strLoad
>       strLoad = Dir
>     Loop
>
> ```To this:
> ```
>     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
>
> ```
> In the latest version of EO

Now getting this error :
musicCache(i) = error..
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...