Вот кусок кода, как сделать сохранение на диск Sub RecordSound() 'записать звук с микрофона (6 сек.) Dim Result& Dim errormsg% Dim ReturnString As String * 1024 Dim ErrorString As String * 1024 CloseSound Result& = mciSendString("open new type waveaudio alias mysound", ReturnString, 1024, 0) If Not Result& = 0 Then errormsg% = mciGetErrorString(Result&, ErrorString, 1024) MsgBox ErrorString, 0, "Error" Exit Sub End If Result& = mciSendString("set mysound time format ms bitspersample 8 samplespersec 11025", ReturnString, 1024, 0) If Not Result& = 0 Then errormsg% = mciGetErrorString(Result&, ErrorString, 1024) MsgBox ErrorString, 0, "Error" Exit Sub End If Result& = mciSendString("record mysound to 60000", ReturnString, 1024, 0) If Not Result& = 0 Then errormsg% = mciGetErrorString(Result&, ErrorString, 1024) MsgBox ErrorString, 0, "Error" Exit Sub End If End Sub
Ответить
|