I am trying to play audio files in WPF and I am currently using the following code:
FileTextBox.Text = selectedFileName; MediaPlayer mp = new MediaPlayer(); mp.Open(new Uri(selectedFileName, UriKind.Relative )); mp.Play();
It works well, except that it does not produce sound. What am I doing wrong?
source share