Repeat single song in a playlist

Professor Mustard picture Professor Mustard · Apr 7, 2010 · Viewed 14k times · Source

I have a PlayList loaded into my WMP instance, and I want it to loop just one song. Everything I've Googled up so far tells me to do this:

private AxWindowsMediaPlayer wmp;
wmp.settings.setMode("loop", true);

However, this only seems to make the entire PlayList repeat. The behavior I want is that, if I enable "repeat" when song 5 in the PlayList is playing, then song 5 will keep automatically repeat when it finishes (instead of proceeding to song 6). Most car MP3 players already work this way; is there a nice native way to do this in my C# program, or will I have to devise a "hack" solution, like intercepting the event that fires when the next song is loaded?

Answer

Machta picture Machta · Apr 7, 2010

Try to create a new set with only one song that you want to play over and over again.