I have an mp3 player that sends MCI commands to play pause/ff/rw/stop the audio files etc and the only thing i can't figure out how to do is send an MCI command to tell it to play the next song when the current one's finished playing.
The songs are in a ListBox. I have no problems actually selecting the next song, I just need to find out when to play the next song on the playlist. I'd appreciate any help at all
Thank you :)
Sorry to dredge this up after a month or so, but I think I may have a nicer answer...
You can do the length in seconds thing, or you can have MCI notify you itself.
When you send your "play" command, tack on "notify" after the media's alias, and then pass your window's handle (I'm using System.Windows.Forms, hence the 'this.Handle'), like so:
That tells MCI to send you a notification when the command completes or is interrupted. Then you can just filter the messages your window receives to see if anything you're interested comes through:
This seems to be working just fine for me. I hope this helps. ;)