Playing 2 sounds together at same time

前端 未结 3 932
野趣味
野趣味 2021-01-05 02:18

Designing a game for any laptop:

I want to play 2 sounds at the same time! A background music and a sound when pressing on a button!

Using System.Media

3条回答
  •  醉梦人生
    2021-01-05 03:23

    http://msdn.microsoft.com/en-us/library/dd562851%28v=VS.85%29.aspx this article may help If you need absolute path to file you can use next code

    string soundFile = Path.Combine(Directory.GetCurrentDirectory() + "file.wav");
    

提交回复
热议问题