Recording and playback voice

Thread Starter

weiix05

Joined Apr 2, 2009
15
Rich (BB code):

Public Class Form1
 
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Integer, ByVal hwndCallback As Integer) As Integer
 
Private Sub Record_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Record.Click
mciSendString("open new Type waveaudio Alias recsound", "", 0, 0)
mciSendString("record recsound", "", 0, 0)
 
End Sub
Private Sub Save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Save.Click
mciSendString("save recsound D:\SOUND\record.wav", "", 0, 0)
mciSendString("close recsound", "", 0, 0)
 
End Sub
Private Sub Play_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Play.Click
My.Computer.Audio.Play("D:\SOUND\record.wav", AudioPlayMode.Background)
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
this code can only use on
one specified computer,
is there anyway to
let it operate on different computer
as the saving of file would be
different.
 
Top