Results 1 to 4 of 4

Thread: DirectX 9 AudioVideoPlayback Error

  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.

  2. #2

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

    More information...

    The event is not raised only when I set volume or Balance for Video Content. It works with Audio Content only.
    It's not really when I set Them. In facts writting :

    sub set volume(volume)
    ourVideo.Audio.volume=volume
    end sub

    unable the event to be raised.

    Another Problem :
    When I play a mp3 file, I first read the id3v2 tag and then, i initialize the Audio object.
    I played sevral mp3s without any problems.
    But when i tried to play a song already played before, I've got an IO error which says the file is already used even though i have disposed the player which was playing it before.

    I have to stop the whole program and run it again to play this song again.


    Sorry if it's not very clear, my english is so bad.

  3. #3
    Member JesusFreak's Avatar
    Join Date
    Feb 2003
    Location
    Headed for Heaven
    Posts
    57
    That if you confess with your mouth, "Jesus is Lord," and believe in your heart that God raised him from the dead, you will be saved.

  4. #4

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

    DX9 .NET

    Sorry, I didn't said i was using Managed DirectX9 for .net

    I'm posting the subject here because :

    1st Using .NET and most of the posts for DirectX9 are in the .NET forums

    2nd Game and Graphics shouldn't use AudioVideoPlayback Dll from DX9 which has been made for media players

    But thank you to remind me there's this forum, if i want to do some graphics.

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