Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Media Player Sound Replacement
#1
MediaPlayer Supported Sound

Much shorter than FMod.

Refrences
Code:
Windows Media Player
Location: C:\WINDOWS\system32\msdxm.ocx

modSound

Code:
Public MusicPlayer As New MediaPlayer.MediaPlayer
Public CurrentSong As String

Public Sub PlayMusic(ByVal Song As String)
If Song  CurrentSong Then
  MusicPlayer.Open App.Path & "\data\music\" & Song
  CurrentSong = Song
End If
End Sub

Syntax

Code:
PlayMusic "Ripple.mp3"

sub GameDestroy
Code:
MusicPlayer.Stop
Set MusicPlayer = Nothing

Sub HandleData (just after "Unload frmMapProperties")
Code:
PlayMusic SaveMap.Music & ".mid"

OPTIONAL EXTRA: PREVIEW MAP MUSIC IN EDITOR
frmMapProperties
Code:
Private Sub Command1_Click()
PlayMusic  scrlMusic.Value & ".mid"
End Sub

OPTIONAL EXTRA: LOOPING SONGS
frmSound
Code:
Public Sub MidiLoop()
If MusicPlayer.PlayState = mpStopped Then
  MusicPlayer.Play
End If
End Sub
Sub GameLoop
Code:
midiloop
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)