' Mixer handle to the bass synch callback when the current track in the mixer ends
Private m_MixerSynchProc As Un4seen.Bass.SYNCPROC
Private m_MixerSyncHandle As Int32 = 0
' Create a new callback for when the current track in the mixer has ended
m_MixerSynchProc = New Un4seen.Bass.SYNCPROC(AddressOf CurrentTrackEnded)
m_MixerSyncHandle = Bass.BASS_ChannelSetSync(m_MixerHandle, Un4seen.Bass.BASSSync.BASS_SYNC_END Or Un4seen.Bass.BASSSync.BASS_SYNC_MIXTIME, 0, m_MixerSynchProc, 0)
A delegate sub that BASS will call when the track is end
' Mixer sync proc callback for when the current track has ended
Private Sub CurrentTrackEnded(ByVal MixerHandle As Int32, ByVal Channel As Int32, ByVal Data As Int32, ByVal User As IntPtr)
' Do stuff here when the track ends
End Sub
Its not C#, but here's some VB.Net code you should be able to convert easily enough:
Set up the callback
' Mixer handle to the bass synch callback when the current track in the mixer ends
Private m_MixerSynchProc As Un4seen.Bass.SYNCPROC
Private m_MixerSyncHandle As Int32 = 0
' Create a new callback for when the current track in the mixer has ended
m_MixerSynchProc = New Un4seen.Bass.SYNCPROC(AddressOf CurrentTrackEnded)
m_MixerSyncHandle = Bass.BASS_ChannelSetSync(m_MixerHandle, Un4seen.Bass.BASSSync.BASS_SYNC_END Or Un4seen.Bass.BASSSync.BASS_SYNC_MIXTIME, 0, m_MixerSynchProc, 0)
A delegate sub that BASS will call when the track is ended
' Mixer sync proc callback for when the current track has ended
Private Sub CurrentTrackEnded(ByVal MixerHandle As Int32, ByVal Channel As Int32, ByVal Data As Int32, ByVal User As IntPtr)
' Do stuff here when the track ends
End Sub
发布评论
评论(1)
它不是 C#,但这里有一些 VB.Net 代码,您应该能够轻松转换:
设置回调
A delegate sub that BASS will call when the track is end
Its not C#, but here's some VB.Net code you should be able to convert easily enough:
Set up the callback
A delegate sub that BASS will call when the track is ended