码迷,mamicode.com
首页 > Windows程序 > 详细

C# 播放声音

时间:2017-01-17 14:06:41      阅读:262      评论:0      收藏:0      [点我收藏+]

标签:play   log   声音   windows   sys   arm   director   bsp   span   

播放系统声音:

string soundPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Windows) + Path.DirectorySeparatorChar + "Media" + Path.DirectorySeparatorChar + "Alarm01.wav";
if (System.IO.File.Exists(soundPath))
{
    AlertPlayer.SoundLocation = soundPath;
    AlertPlayer.Load();
    AlertPlayer.PlayLooping();
}

 

C# 播放声音

标签:play   log   声音   windows   sys   arm   director   bsp   span   

原文地址:http://www.cnblogs.com/wzwyc/p/6292659.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!