谢谢了,还有上边的LineGetID函数,我想取一个LineOpen的线路设备的ID,
后边的DeviceClass用‘tapi/line’,总是取到空值。用了“Wave/Out”能取到一个,放在
WaveOutOpen里边的DeviceID却总是返回“BadFormat”,换成“LineMapper”可以通过,但
播放声音从声卡出来了:
..........取设备ID
LineGetID(Line,0,Call,LINECALLSELECT_Call,xVarString,'wave/out');
//Result:=PHandle(LpStr(xVarString)[xVarString.dwStringOffset])^;
Try
GetMem(xValue,xVarString^.dwStringSize);
Move( pChar(xVarString)[xVarString^.dwStringOffset],xValue^,xVarString^.dwStringSize); //xVarString^.dwStringOffset
Result:=dWord(xValue^);
Finally
FreeMem(xValue);
FreeMem(xVarString);
End;
..............播放声音
nValue:=WaveOutOpen(@WaveOut,LineMapper,WaveFormat,Cardinal(@WaveOutProc),xInstance,CallBack_Function);
这里的LineMapper~!