我用
public static extern void StartRecordFileNew(short wChnlNo,byte[] FileName, int dwPlayLen, int dwRecordStartPos);
语音卡录音函数实现录音功能,怎么才能把FileName和dwRecordStartPos(录音开始位置)写成绝对路径?
FileName=encoding.ascii.getbytes(path)
外部函數要你傳甚麼類型的參 你就得弄甚麼類型的參
写了个方法内容如下:
public static void LY()
{
D1.PUSH_PLAY();
D1.FeedSigFunc();
byte[] FileName;
char[] TmpFilePath;
short TmpDTMF;
for(short i=0; i<TotalLine; i++)
{
Lines[i].Dtmf = Lines[i].Dtmf + CvtDTMF(TmpDTMF);
if(TmpDTMF != -1)
{
Lines[i].Dtmf = TmpDTMF.ToString();
switch(Lines[i].Dtmf)
{
case "1":
//FileName = encoding.ascii.getbytes(path);
StartRecordFileEx(i,"liuyan.001");
break;
case"2":
D1.StopRecordFile(i);
break;
// case"3":
// startplayfile(i,'voc\end2.pcm',0);;
// break;
default:
break;
}
}
}
}
调试是出错说使用了未赋值的局部变量“TmpDTMF”大虾们帮忙看看该怎么改?