Click here to Skip to main content
15,888,257 members
Please Sign up or sign in to vote.
1.40/5 (2 votes)
See more:
I'm new to NAudio but I am currently able to load an audio file and play it in my program. Now, I want to achieve being able to loop this audio file but not until after every 2 second interval. How can I achieve this?
Posted
Comments

1 solution

Perheaps this will help you. Not the most elegant way, but it could work.
C#
async void play()
{
   while (true)
   {
       //Play the sample, then:
       await Task.Delay(2000);
   }
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900