Delay in for loop while playing mp3 file C#
        Posted  
        
            by 
                daniyalahmad
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by daniyalahmad
        
        
        
        Published on 2013-11-09T09:18:58Z
        Indexed on 
            2013/11/09
            9:53 UTC
        
        
        Read the original article
        Hit count: 202
        
I want to give delay in for loop, While in for loop there is mp3 file is playing. What I actually want to do, that every clip plays after 2 sec. There are total 10 clips. Here is my code
    for (int i=1; i < 10; i++)
        {
            System.Threading.Thread.Sleep(1000);
            WMPLib.WindowsMediaPlayer wplayer = new WMPLib.WindowsMediaPlayer();
            wplayer.URL = @"D:\Project C#\A-Z\" + i + ".mp3";
        }
        © Stack Overflow or respective owner