查下API里录音的,函数,调用下
估计成吧
估计成吧
解决方案 »
- 怎么从一张有多个小图标的图片中得到每个图标的集合
- DropDownList做家庭住址
- 关于计算公式问题
- 错误::“string”并不包含“args”的定义
- ASP.NET上面的网页程序怎么和应用程序通信啊
- 解压后用Directioyinfo无法获得目录文件的问题
- using (FileStream fileStream = File.OpenRead(path))报路径访问被拒绝,要怎么改~~~
- 使用C# 实现直接操作dc 发传真 FaxStartPrintJob does't work
- 请问为什么Debug下面没有.dll文件?
- .net的ClassLibary是不是对WinAPI的封装?
- 求助高手!!(括号嵌套问题)
- 如何让c#文本框拥有联想功能
using System.Collections.Generic;
using System.Text;
using System.Media;namespace GCSoundPlayer
{
public class Player
{
private string _wavPath;
private SoundPlayer _currentPlayer; public string WavPath
{
get
{
return _wavPath;
}
set
{
_wavPath = value;
}
} public SoundPlayer CurrentPlayer
{
get
{
return _currentPlayer;
}
set
{
_currentPlayer = value;
}
} public void Start()
{ _currentPlayer = new SoundPlayer(_wavPath);
_currentPlayer.LoadAsync();
if (_currentPlayer.IsLoadCompleted == true)
_currentPlayer.Play();
else
throw new Exception("声音未加载完毕!");
} public void Stop()
{
if (_currentPlayer != null)
{
_currentPlayer.Stop();
}
} public void Suspend()
{
if (_currentPlayer != null)
{ }
} public void ChangeSound(int advance)
{
throw new System.NotImplementedException();
} public void Close()
{
if (_currentPlayer != null)
{
_currentPlayer = null;
}
}
}
}有现成的。