0

I'm new to the Bass library but is it possible to pass in a list of times that trigger an event when the song has reached that time? For example, if I set a trigger at 30 seconds, when the song reaches 30 seconds, can I call an event?

XSL
  • 2,965
  • 7
  • 38
  • 61

1 Answers1

0

I do that using BASS_ChannelSetSync with BASS_SYNC_POS, I use VB not C# but perhaps may help you... and excuse my english

I define a SYNPROC pointing to the the sub that manage the event "time reached"

    Private M_SyncMarca As Un4seen.Bass.SYNCPROC = New  Un4seen.Bass.SYNCPROC(AddressOf sync_marcas)
    Private M_HandlerMarcas As Integer

then, add the reference to your channel

    M_HandlerMarcas = Bass.BASS_ChannelSetSync(pista_actual, BASSSync.BASS_SYNC_POS, marca_fin, M_SyncMarca, IntPtr.Zero)

and finaly, the subrutine to manage wath you want when time is reached.

    Private Sub sync_marcas()
    Me.Invoke(New System.Windows.Forms.MethodInvoker(AddressOf manejar_marca))
End Sub

there where may be painful with threads, that's why I point to another sub rutine.

I hope this can help you

Daniel
  • 1
  • 1