mcisendstring正常工作,突然不工作 [英] mcisendstring worked fine suddenly not working

查看:94
本文介绍了mcisendstring正常工作,突然不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一段工作正常的代码.但是突然停止工作了吗?
msisendstring不保存?这真的很奇怪..直到现在它一直工作100%.

这是代码:

Hi,

I have a piece of code that was working fine. But has all of a sudden stopped working?
the msisendstring does not save? this is really strange.. as it worked 100% up until now.

here is the code:

string dateStamp = Convert.ToString(DateTime.Now.ToString("yyyy_MM_dd_hh_mm_ss"));

String inputLocal = "";

String recName = dateStamp + ".wav";

this.recording.fileName = recName;

DateTime totalEndTime = DateTime.Now;
            

inputLocal = "C:\\Recordings\\" + recName;

 // writing the recording to the local hard drive (C:\Recordings\file_name) so that I can grab the FileInfo

mciSendString("save recsound " + inputLocal, "", 0, 0);
mciSendString("close recsound ", "", 0, 0);
Console.WriteLine("Recording Saved as " + inputLocal);
Computer c = new Computer();
c.Audio.Stop();
totalEndTime = DateTime.Now;

推荐答案

选项1:
由于您要处理音频驱动程序,因此需要验证其功能.

选项2:
如果option-1可以正常工作,则设置断点以查看其确切的位置.
Option 1:
Since you are dealing with audio driver, you need to validate its functionality.

Option 2:
If option-1 works fine, then set the breakpoints to see where exactly it fails.


这篇关于mcisendstring正常工作,突然不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆