aboczko:
Looks like your code is running on the same thread as the UI. Try creating a separate thread to run the code above when running under WPF or WinForms.
Also, playback should stop automatically when the end of the stream is reached, so the position check should not be necessary.
Have fun!
Looks like your code is running on the same thread as the UI. Try creating a separate thread to run the code above when running under WPF or WinForms.
Also, playback should stop automatically when the end of the stream is reached, so the position check should not be necessary.
Have fun!