Лабораторная работа: Audio recorder on visual basic

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

К-во Просмотров: 633
Бесплатно скачать Лабораторная работа: Audio recorder on visual basic