Merhaba;

winmm.dll dosyasını kullanarak mikrofon ve hoparlor aygıtını ComboBox ta gosterip secmek ve bunları TrackBar veya ComboBox ile ses değerlerini değiştirmek istiyorum. Birsuru kaynak kurcaladım fakat sonuca ulaşamadım.
Ekran Goruntusu


Kod:
Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Integer) As Integer Private Declare Function mciExecute Lib "winmm.dll" (ByVal lpstrCommand As String) As Long 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 Declare Function waveOutSetVolume Lib "winmm.dll" (ByVal uDeviceID As Integer, ByVal dwVolume As Integer) As Integer Declare Function waveOutGetVolume Lib "winmm.dll" Alias "waveOutGetVolume" (ByVal wDeviceID As Integer, ByRef lpdwvolume As Integer) As Integer Declare Function waveOutGetNumDevs Lib "winmm.dll" () As Long 'ses kartı bilgisi Declare Function mixerSetControlDetails Lib "winmm.dll" (ByVal hmxobj As IntPtr, ByVal pmxcd As AudioMixerHelper.MIXERCONTROLDETAILS, ByVal fdwDetails As Integer) As Integer Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load sesaygitlariniyukle() Label2.Text = "Ses Kartı :" & seskartivarmi() End Sub Function seskartivarmi() As Boolean Dim rtn As Long rtn = waveOutGetNumDevs() 'ses kartı var mı diye kontrol et. True/False Değeri Veriyor. seskartivarmi = rtn > 0 End Function Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Button1.Enabled = False Button2.Enabled = True mciSendString("open new Type waveaudio Alias recsound", "", 0, 0) mciSendString("record recsound", "", 0, 0) Label1.Text = "Kaydediliyor.." Label1.Visible = True End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Button1.Enabled = True Button2.Enabled = False Button3.Enabled = True mciSendString("save recsound recsound.wav", "", 0, 0) mciSendString("close recsound", "", 0, 0) MsgBox("Dosya Oluşturuldu: recsound.wav") Label1.Text = "Durduruluyor.." Label1.Visible = False My.Computer.Audio.Stop() End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Label1.Text = "Oynatılıyor.." Label1.Visible = True My.Computer.Audio.Play("recsound.wav", AudioPlayMode.Background) End Sub Private Sub sesaygitlariniyukle() End Sub
Cevaplarınız icin şimdiden teşekkurler.
__________________