@@ -1,4 +1,7 @@
|
|||||||
Public Module ModMusic
|
Imports NAudio.CoreAudioApi
|
||||||
|
Imports NAudio.CoreAudioApi.Interfaces
|
||||||
|
|
||||||
|
Public Module ModMusic
|
||||||
|
|
||||||
#Region "播放列表"
|
#Region "播放列表"
|
||||||
|
|
||||||
@@ -255,7 +258,7 @@
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' 当前正在播放的 NAudio.Wave.WaveOut。
|
''' 当前正在播放的 NAudio.Wave.WaveOutEvent。
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Public MusicNAudio = Nothing
|
Public MusicNAudio = Nothing
|
||||||
''' <summary>
|
''' <summary>
|
||||||
@@ -267,12 +270,13 @@
|
|||||||
''' 在 MusicUuid 不变的前提下,持续播放某地址的音乐,且在播放结束后随机播放下一曲。
|
''' 在 MusicUuid 不变的前提下,持续播放某地址的音乐,且在播放结束后随机播放下一曲。
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Private Sub MusicLoop(Optional IsFirstLoad As Boolean = False)
|
Private Sub MusicLoop(Optional IsFirstLoad As Boolean = False)
|
||||||
Dim CurrentWave As NAudio.Wave.WaveOut = Nothing
|
Dim CurrentWave As NAudio.Wave.WaveOutEvent = Nothing
|
||||||
Dim Reader As NAudio.Wave.WaveStream = Nothing
|
Dim Reader As NAudio.Wave.WaveStream = Nothing
|
||||||
Try
|
Try
|
||||||
'开始播放
|
'开始播放
|
||||||
CurrentWave = New NAudio.Wave.WaveOut()
|
CurrentWave = New NAudio.Wave.WaveOutEvent()
|
||||||
MusicNAudio = CurrentWave
|
MusicNAudio = CurrentWave
|
||||||
|
CurrentWave.DeviceNumber = -1
|
||||||
Reader = New NAudio.Wave.AudioFileReader(MusicCurrent)
|
Reader = New NAudio.Wave.AudioFileReader(MusicCurrent)
|
||||||
CurrentWave.Init(Reader)
|
CurrentWave.Init(Reader)
|
||||||
CurrentWave.Play()
|
CurrentWave.Play()
|
||||||
|
|||||||
Reference in New Issue
Block a user