Quantcast
Viewing all articles
Browse latest Browse all 256

Why does mediaplayer() cuts off my sound?

When using mediaplayer() and plays a 12 seconds sound file, it cuts off the sound.
I can reproduce the problem this way:

Code:

Class MainWindow
    Private Sub Window_Loaded(sender As Object, e As RoutedEventArgs)
    End Sub

    Private Sub textBox_TextChanged(sender As Object, e As TextChangedEventArgs) Handles textBox.TextChanged
        If textBox.Text = "test" Then
            Dim mplayer2 As New MediaPlayer
            mplayer2.Open(New Uri("YOUR at least 12 seconds sound file here"))
            mplayer2.Play()
        End If
    End Sub

End Class

Can anybody tell me why it stops before end of sound? I have read something about the garbage collector is cleaning up, but it don't quit understand it.
How can I tell mediaplayer to play the file to the end?

Anyone?

Viewing all articles
Browse latest Browse all 256

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>