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

'long filenames that have spaces in them, so we

'will make another API call to get the short

'filename version.

'This is accomplished by the function GetShortName

'MCI command to save the WAV file

If Has_Space (sName) Then

WaveShortFileName = GetShortName (sName)

WaveLongFileName = sName

WaveRenameNecessary = True

' These are necessary in order to be able to rename file

i = mciSendString ("save capture " & WaveShortFileName, rtn, Len (rtn), 0)

Else

i = mciSendString ("save capture " & sName, rtn, Len (rtn), 0)

End If

If i <> 0 Then MsgBox ("Saving file failed, file name was: " & sName)

End Sub

Public Sub WaveStop ()

Dim rtn As String

Dim i As Long

i = mciSendString ("stop capture", rtn, Len (rtn), 0)

If i <> 0 Then MsgBox ("Stopping recording failed!")

If WaveMidiFileName <> "" Then

i = mciSendString ("stop midi", rtn, Len (rtn), 0)

If i <> 0 Then MsgBox ("Stopping playing midi file failed!")

End If

End Sub

Public Sub WavePlay ()

Dim rtn As String

Dim i As Long

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