26/07/2013, 19:28
ses kayıt işlemi yapabilirmiyim diye araştırdığımda aşağıdaki vb kodlrını gördum örnekte denedim ama başaramadım yardımlarınızı bekliyorum...
Imports System.Runtime.InteropServices
<DllImport("winmm.dll", EntryPoint:="mciSendStringA", CharSet:=CharSet.Ansi, SetLastError:=True, ExactSpelling:=True)> _
Private Shared Function mciSendString(ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Integer, ByVal hwndCallback As Integer) As Integer
End Function
Public Sub Kaydedici(ByVal islem As String, ByVal path As String, ByVal isim As String)
If islem = "baslat" Then
mciSendString("open new Type waveaudio Alias recsound", "", 0, 0)
mciSendString("record recsound", "", 0, 0)
ElseIf islem = "bitir" Then
mciSendString("save recsound " & path & "/" & isim & ".wav", "", 0, 0)
mciSendString("close recsound ", "", 0, 0)
End If
End Sub
Kaydı başlat kodu:
Kaydedici("baslat","","")
Kaydet ve bitir kodu :
Kaydedici("bitir","C:","ses_kaydi")
Imports System.Runtime.InteropServices
<DllImport("winmm.dll", EntryPoint:="mciSendStringA", CharSet:=CharSet.Ansi, SetLastError:=True, ExactSpelling:=True)> _
Private Shared Function mciSendString(ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Integer, ByVal hwndCallback As Integer) As Integer
End Function
Public Sub Kaydedici(ByVal islem As String, ByVal path As String, ByVal isim As String)
If islem = "baslat" Then
mciSendString("open new Type waveaudio Alias recsound", "", 0, 0)
mciSendString("record recsound", "", 0, 0)
ElseIf islem = "bitir" Then
mciSendString("save recsound " & path & "/" & isim & ".wav", "", 0, 0)
mciSendString("close recsound ", "", 0, 0)
End If
End Sub
Kaydı başlat kodu:
Kaydedici("baslat","","")
Kaydet ve bitir kodu :
Kaydedici("bitir","C:","ses_kaydi")