111,120
社区成员
发帖
与我相关
我的任务
分享
public bool SetSpeed(int Speed)
{
bool result = false;
double speed = 0.05;
string MciCommand = string.Format("set NOWMUSIC speed to {0}", speed);
int RefInt = mciSendString(MciCommand, null, 0, IntPtr.Zero);
Console.WriteLine("############## 返回值是"+RefInt+" ##############");
if (RefInt == 0)
{
result = true;
}
return result;
}



/// <summary>
/// 控制播放速度
/// </summary>
/// <param name="speed"></param>
public bool SetSpeed(int speed)
{
durLength = "";
durLength = durLength.PadLeft(128, Convert.ToChar(" "));
speed = 1200;
bool result = false;
string MciCommand = string.Format("set media speed {0}", speed);
int RefInt = mciSendString(MciCommand, durLength, durLength.Length, 0);
if (RefInt == 0)
result = true;
return result;
}