Fixed music crashes
* Fixed crash when trying to play an intro of a battle song that wasn't an ogg * Fixed crash when trying to resume the music after using the command @music.stop
This commit is contained in:
parent
fbba01d0c4
commit
1d4087aa2a
|
@ -63,9 +63,9 @@ Public Class LoopStream
|
|||
Else
|
||||
If MusicManager._afterBattleIntroSong.AudioType = ".ogg" Then
|
||||
_sourceStream = New VorbisWaveReader(MusicManager._afterBattleIntroSong.Song)
|
||||
ElseIf IntroSong.AudioType = ".mp3" Then
|
||||
ElseIf MusicManager._afterBattleIntroSong.AudioType = ".mp3" Then
|
||||
_sourceStream = New Mp3FileReader(MusicManager._afterBattleIntroSong.Song)
|
||||
ElseIf IntroSong.AudioType = ".wma" Then
|
||||
ElseIf MusicManager._afterBattleIntroSong.AudioType = ".wma" Then
|
||||
_sourceStream = New MediaFoundationReader(MusicManager._afterBattleIntroSong.Song)
|
||||
End If
|
||||
_enableLooping = True
|
||||
|
@ -334,9 +334,7 @@ Public Class MusicManager
|
|||
End Sub
|
||||
|
||||
Public Shared Sub [Stop]()
|
||||
If Not outputDevice Is Nothing Then
|
||||
outputDevice.Stop()
|
||||
End If
|
||||
MusicManager.Play(NO_MUSIC, False, 0.0F)
|
||||
_isIntroStarted = False
|
||||
End Sub
|
||||
|
||||
|
|
Loading…
Reference in New Issue