I've Tried to load video using AudioVideoPlayback.
It works well until I set Volume or Balance.
It doesn't show any error but the ending event is not raised for unknown reason.
When I don't set Volume or balance, this event is raised normaly.
If any one knows about this bug...
Code:Private Sub ClipEnd(ByVal sender As Object, ByVal e As EventArgs) Handles ourAudio.Ending, ourVideo.Ending 'Stop and restart our clip when it ends If Not (ourVideo Is Nothing) Then ourVideo.Stop() 'myForm.EventPlayer(PLAYER_EVENTS.PLAYER_EOF, "", "") Else If Not (ourAudio Is Nothing) Then ourAudio.Stop() 'myForm.EventPlayer(PLAYER_EVENTS.PLAYER_EOF, "", "") End If End If End Sub Public Function SetPlayBackVolume(ByVal volume As Integer) As Boolean Implements Player.SetPlayBackVolume lngVolume = volume '0 to 255 'DX Volume -10000 to 0 If Not (ourVideo Is Nothing) Then 'ourVideo.Audio.Volume = (volume - 255) * 39 Else If Not (ourAudio Is Nothing) Then ' ourAudio.Volume = (volume - 255) * 39 End If End If End Function Public Function SetPlayBackBalance(ByVal Balance As Integer) As Boolean Implements Player.SetPlayBackBalance lngBalance = Balance '0 to 255 'DX Balanc -10000 to 10000 If Not (ourVideo Is Nothing) Then 'ourVideo.Audio.Balance = (Balance - 128) * 78 Else If Not (ourAudio Is Nothing) Then 'ourAudio.Balance = (Balance - 128) * 78 End If End If End Function




Reply With Quote