设置好路径后如何实现循环播放?
[DllImport("winmm.dll")] static extern Int32 mciSendString( String command, StringBuilder buffer, Int32 bufferSize, IntPtr hwndCallback, uint hWndCallback);
播放的方法:
void OpenMedia(string path) { mciSendString("open " + path + " alias media", null, 0, Handle,0); mciSendString("play media", null, 0, Handle,0); }
解决了
mciSendString("open " + path + " alias media", null, 0, Handle,0); mciSendString("play media repeat", null, 0, Handle,0);
加个字符repeat就行了