|
Try
pDSCaptureBuffer = New CaptureBuffer(dscheckboxd, cap)
InputFormatSupported(iIndex) = True
Catch
InputFormatSupported(iIndex) = False
End Try
pDSCaptureBuffer.Dispose()
Next iIndex
Cursor = Cursors.Default
End Sub ''''ScanAvailableInputFormats
Private Sub GetWaveFormatFromIndex(ByVal Index As Integer, ByRef format As WaveFormat)
''''-----------------------------------------------------------------------------
'''' Name: GetWaveFormatFromIndex()
'''' Desc: Returns 20 different wave formats based on Index
''''-----------------------------------------------------------------------------
Dim SampleRate As Integer = Index / 4
Dim iType As Integer = Index Mod 4
Select Case SampleRate
Case 0
format.SamplesPerSecond = 48000
Case 1
format.SamplesPerSecond = 44100
Case 2
format.SamplesPerSecond = 22050
Case 3
format.SamplesPerSecond = 11025
Case 4
format.SamplesPerSecond = 8000
End Select
Select Case iType
Case 0
format.BitsPerSample = 8
format.Channels = 1
Case 1
format.BitsPerSample = 16
format.Channels = 1
Case 2
format.BitsPerSample = 8
format.Channels = 2
Case 3
format.BitsPerSample = 16
format.Channels = 2
End Select
format.BlockAlign = CShort(format.Channels * (format.BitsPerSample / 8))
format.AverageBytesPerSecond = format.BlockAlign * format.SamplesPerSecond
End Sub ''''GetWaveFormatFromIndex
Private Shared Function ConvertWaveFormat 上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] ... 下一页 >> [聊天工具]让IE 7也用上鼠标手势 [常用软件]IE 7出炉,Firefox 2当道.谁才是“王者”? [常用软件]绕过WGA安装IE 7 Beta3 5450 [VB.NET程序]VB.NET实现DirectSound9 (8) 音效控制器 [VB.NET程序]VB.NET实现DirectSound9 (6) 声音特效 [VB.NET程序]VB.NET 实现DirectSound9 (5) DS3D2 [VB.NET程序]用VB.Net实现DirectSound9 (4) DS3D [VB.NET程序]VB.NET 使用DirectSound 3 [VB.NET程序]学习笔记,VB.NET使用DirectSound9 (2) [VB.NET程序]学习笔记,VB.NET使用DirectSound9 (1)
|