积极答复者
怎么使用C#播放麦克风输入的音频呢?

问题
-
我想实时播放麦克风输入的音频,该怎么办呢?
使用C#.......
- 已移动 ThankfulHeartModerator 2014年1月30日 4:29 C#问题
答案
-
如果你录制的是wav,那么完全可以这样使用:
1)引用类库:System.Media.SoundPlayer
2)这样播放:
string path = “....../sound.wav”;//.wav音频文件路径 System.Media.SoundPlayer player = new System.Media.SoundPlayer(path); player.Play();//简单播放一遍 player.PlayLooping();//循环播放 player.PlaySync();//另起线程播放
3)节选自:http://blog.csdn.net/lance_lot1/article/details/8202602ASP.NET Questions
Other Discussions
FreeRice Donate
Issues to report
Free Tech Books Search- 已标记为答案 CaillenModerator 2014年2月7日 8:29
全部回复
-
如果你录制的是wav,那么完全可以这样使用:
1)引用类库:System.Media.SoundPlayer
2)这样播放:
string path = “....../sound.wav”;//.wav音频文件路径 System.Media.SoundPlayer player = new System.Media.SoundPlayer(path); player.Play();//简单播放一遍 player.PlayLooping();//循环播放 player.PlaySync();//另起线程播放
3)节选自:http://blog.csdn.net/lance_lot1/article/details/8202602ASP.NET Questions
Other Discussions
FreeRice Donate
Issues to report
Free Tech Books Search- 已标记为答案 CaillenModerator 2014年2月7日 8:29
-
hello,
有几个方法可以播放音频
P/Invike mciSendString
http://stackoverflow.com/questions/3129361/how-to-play-mp3-files-in-c
WMPLib.WindowsMediaPlayer
System.Media.SoundPlayer
http://stackoverflow.com/questions/15025626/playing-a-mp3-file-in-a-winform-application
http://stackoverflow.com/questions/5756855/c-sharp-play-sound-with-one-line-of-c-sharp-code
秘訣無它,唯勤而已 http://www.dotblogs.com.tw/yc421206/
- 已建议为答案 ThankfulHeartModerator 2014年2月7日 8:45