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

Jukebox MP3


egemert35
 Share

Recommended Posts

[http://www.touchofde…ge__hl__jukebox](http://www.touchofdeathforums.com/community/index.php?/topic/119345-adding-a-jukebox/page__hl__jukebox)

Guys, i want to change jukebox format, but how? (Midi to MP3)

(Mortal Angels MP3 System Link Here: [http://www.touchofde…ng-mp3-to-eo23/](http://www.touchofdeathforums.com/community/index.php?/topic/128597-adding-mp3-to-eo23/))
Link to comment
Share on other sites

The tutorial does not include the actual PlayMidi sub from what I see so this is a blind statement. From what I gather, there's only one place you see ".mid".

Change that one line of code to:

```

Dim Path as String

Path = lstJuke.List(lstJuke.ListIndex & ".mid"

If FileExist(Path) Then

PlayMidi Path

Else

Path = lstJuke.List(lstJuke.ListIndex & ".mp3"

PlayMidi Path

End If

```

Now this is untested, but the logic is correct compared to the information in the link you provided.
Link to comment
Share on other sites

> The tutorial does not include the actual PlayMidi sub from what I see so this is a blind statement. From what I gather, there's only one place you see ".mid".
>
> Change that one line of code to:
>
> ```
>
> Dim Path as String
>
> Path = lstJuke.List(lstJuke.ListIndex & ".mid"
>
> If FileExist(Path) Then
>
> PlayMidi Path
>
> Else
>
> Path = lstJuke.List(lstJuke.ListIndex & ".mp3"
>
> PlayMidi Path
>
> End If
>
> ```
>
> Now this is untested, but the logic is correct compared to the information in the link you provided.

Thank you bro.

I just added

PlayMusic lstJuke.List(lstJuke.ListIndex) & ".mp3"

And worked.

Like that:

```

Private Sub cmdPlay_Click()

If Options.Music = 1 Then

StopMusic

PlayMusic lstJuke.List(lstJuke.ListIndex) & ".mid"

PlayMusic lstJuke.List(lstJuke.ListIndex) & ".mp3"

Else

StopMusic

End If

End Sub

```
Link to comment
Share on other sites

> Thank you bro.
>
> I just added
>
> PlayMusic lstJuke.List(lstJuke.ListIndex) & ".mp3"
>
> And worked.
>
> Like that:
>
> ```
>
> Private Sub cmdPlay_Click()
>
> If Options.Music = 1 Then
>
> StopMusic
>
> PlayMusic lstJuke.List(lstJuke.ListIndex) & ".mid"
>
> PlayMusic lstJuke.List(lstJuke.ListIndex) & ".mp3"
>
> Else
>
> StopMusic
>
> End If
>
> End Sub
>
> ```

What ever works for you bud. Out of pure experience, I see what you have posing a possible issue. Try making two files with the same name but different extensions and test it. See what happens for me if you would.

What works right now, may not always work in the future. It's never a bad idea to test every possible outcome you can think of.
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...