mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-04-08 18:35:09 +02:00
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…
x
Reference in New Issue
Block a user