46553 (Audio recorder on visual basic), страница 3
Описание файла
Документ из архива "Audio recorder on visual basic", который расположен в категории "". Всё это находится в предмете "информатика" из 1 семестр, которые можно найти в файловом архиве . Не смотря на прямую связь этого архива с , его также можно найти и в других разделах. Архив можно найти в разделе "лабораторные работы", в предмете "информатика, программирование" в общих файлах.
Онлайн просмотр документа "46553"
Текст 3 страницы из документа "46553"
i = mciSendString ("status capture bitspersample", mssg, 255, 0)
If i <> 0 Then MsgBox ("Finding resolution failed!")
WaveStatisticsMsg = WaveStatisticsMsg & Str (mssg) & " bits - "
i = mciSendString ("status capture samplespersec", mssg, 255, 0)
If i <> 0 Then MsgBox ("Finding sample rate failed!")
WaveStatisticsMsg = WaveStatisticsMsg & Str (mssg) & " samples per second " & vbCrLf & vbCrLf
End Sub
Public Sub WaveClose ()
Dim rtn As String
Dim i As Long
i = mciSendString ("close capture", rtn, Len (rtn), 0)
If i <> 0 Then MsgBox ("Closing MCI failed!")
End Sub
Public Function WavePosition () As Long
Dim rtn As String
Dim i As Long
Dim pos As String
rtn = Space (255)
pos = Space (255)
i = mciSendString ("set capture time format ms", rtn, Len (rtn), 0)
If i <> 0 Then MsgBox ("Setting format in milliseconds failed!")
i = mciSendString ("status capture position", pos, 255, 0)
If i <> 0 Then MsgBox ("Finding position failed!")
If i <> 0 Then MsgBox ("Error in position")
WavePosition = CLng (pos)
End Function
Public Sub WavePlayFrom (Position As Long)
Dim rtn As String
Dim i As Long
Dim pos As String
pos = CStr (Position)
i = mciSendString ("set capture time format ms", 0&, 0, 0)
If i <> 0 Then MsgBox ("Setting format in milliseconds failed!")
i = mciSendString ("play capture from " & pos, rtn, Len (rtn), 0)
If i <> 0 Then MsgBox ("Playing from indicated position failed!")
If i <> 0 Then MsgBox ("Play from position doesn't work... ")
End Sub
Interface in Action