Results 1 to 4 of 4

Thread: DirectX 9 AudioVideoPlayback Error

Threaded View

  1. #1

    Thread Starter
    Lively Member matt3011's Avatar
    Join Date
    May 2002
    Location
    France
    Posts
    82

    DirectX 9 AudioVideoPlayback Error

    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
    Last edited by matt3011; Apr 24th, 2003 at 12:33 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width