#Region "References" mports Microsoft.DirectX Imports Microsoft.DirectX.DirectSound Imports System.Threading #End Region Friend Class frm_main ... #Region "Command Button" Private Sub cmd_capture_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmd_capture.Click Try If Not devices_waveformat() Then Return DSBuffer.Start(False) Thread.Sleep((DSSamples / DSFrequency) * 1000) 'Containing Input Data Dim DSArray As Array = DSBuffer.Read(0, Type.GetType("Integer"), LockFlag.FromWriteCursor, DSFormatArray) DSBuffer.Stop() Catch ex As Exception Debug.WriteLine(ex.Message) Debug.WriteLine(ex.ToString) End Try End Sub #End Region ... End Class
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)