When using mediaplayer() and plays a 12 seconds sound file, it cuts off the sound.
I can reproduce the problem this way:
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?
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
How can I tell mediaplayer to play the file to the end?
Anyone?