I\'m trying to play an MP3 file in C# using this guide: http://www.crowsprogramming.com/archives/58
And I\'m doing everything listed, but I still can\'t play any mus
I'm not sure it's still relevant but when I tried it, it only worked when the code ran not in the main thread, i.e., this.InvokeRequired == false
So, I would advice you try something like:
ThreadPool.QueueUserWorkItem(
delegate(object param)
{
WMPLib.WindowsMediaPlayer player = new WMPLib.WindowsMediaPlayer();
player.URL = "song.mp3";
});
player.controls.play()
is not needed since the player is set to auto play.
I'm not sure as to why the main thread won't play correctly but I hope this will help.