using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Media;
namespace _01我的第一个
{
class Program
{
static void Main(string[] args)
{
// string path = "X:\\Users\\SwordArtOnline\\Desktop\\aa\\Ring10.wav";
//@的作用是忽略转义符
string path = @"X:\Users\SwordArtOnline\Desktop\aa\Ring10.wav";
SoundPlayer bgm = new SoundPlayer(path);
bgm.Play();
bgm.PlayLooping();//循环播放
Console.WriteLine("hello world");
Console.ReadKey();
bgm.Stop();
}
}
}
c#让音乐循环播放
最新推荐文章于 2024-05-09 12:43:14 发布