vc++中调用MCI录音函数的采样频率是多少?
- 你的回答被采纳后将获得:
- 系统奖励15(财富值+成长值)+难题奖励30(财富值+成长值)
展开全部
直接用API函数mciSendString就行了:
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" _
(ByVal lpstrCommand As String, ByVal lpstrReturnString As String, _
ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long
Private Sub Command1_Click()
'开始录音
Dim iRet As Long
iRet = mciSendString("open new type waveaudio alias MyRecord", 0&, 0, 0)
iRet = mciSendString("set MyRecord bitspersample 16 samplespersec 16384", 0&, 0, 0)
iRet = mciSendString("record MyRecord overwrite", 0&, 0, 0)
End Sub
Private Sub Command2_Click()
'保存录音
Dim iRet As Long
iRet = mciSendString("save MyRecord c:\1.wav", 0&, 0, 0)
iRet = mciSendString("close MyRecord", 0&, 0, 0)
End Sub
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" _
(ByVal lpstrCommand As String, ByVal lpstrReturnString As String, _
ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long
Private Sub Command1_Click()
'开始录音
Dim iRet As Long
iRet = mciSendString("open new type waveaudio alias MyRecord", 0&, 0, 0)
iRet = mciSendString("set MyRecord bitspersample 16 samplespersec 16384", 0&, 0, 0)
iRet = mciSendString("record MyRecord overwrite", 0&, 0, 0)
End Sub
Private Sub Command2_Click()
'保存录音
Dim iRet As Long
iRet = mciSendString("save MyRecord c:\1.wav", 0&, 0, 0)
iRet = mciSendString("close MyRecord", 0&, 0, 0)
End Sub
追问
这是用c++语言写的吗?Private Sub Command1_Click()........End Sub是什么?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询