Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET
Folks
Engaging in a project as a newbie in soundscan, encountered problems while implementing this simple piece of code. It's my appreciation if you lead me through this dense un-documented forest by microsoftFrown | :-( !!
P.S.1 : Please introduce me a cook-book or any useful tutorial or documentation in directsound what i couldn't find it anywhere!!!
P.S.2:You can also find the code here:http://www.4shared.com/get/j0J8g6wA/SSM-VBNET-DirectSound.html[^]
TnxSmile | :) .
 
#Region "References"
Imports 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
Posted 29-Jan-11 20:12pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web04 | 2.8.140709.1 | Last Updated 30 Jan 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid