Console Application c# background music

This question already has an answer here:

  • Play multiple sounds using SoundPlayer 5 answers

  • You're using the win32 function PlaySound, correct? If you look at the documentation, you'll see that there is a flag called SND_NOSTOP. If you set this flag, PlaySound will not attempt to stop sounds which are playing from the process.

    Here's the documentation: http://msdn.microsoft.com/en-us/library/windows/desktop/dd743680(v=vs.85).aspx

    Here's a guide to using PlaySound in C#, which includes the flags so you can set it up yourself: http://www.codeproject.com/Articles/175030/PlaySound-A-Better-Way-to-Play-Wav-Files-in-C

    链接地址: http://www.djcxy.com/p/25990.html

    上一篇: C#从您的资源中一次播放多个音频文件?

    下一篇: 控制台应用程序c#背景音乐