ToString(ByVal format As WaveFormat) As String
''''-----------------------------------------------------------------------------
'''' Name: ConvertWaveFormatToString()
'''' Desc: Converts a wave format to a text string
''''-----------------------------------------------------------------------------
Return format.SamplesPerSecond.ToString() + " Hz, " + format.BitsPerSample.ToString() + "-bit " + IIf(format.Channels = 1, "Mono", "Stereo")
End Function ''''ConvertWaveFormatToString
Sub FillFormatListBox()
''''-----------------------------------------------------------------------------
'''' Name: FillFormatListBox()
'''' Desc: Fills the format list box based on the availible formats
''''-----------------------------------------------------------------------------
Dim info As New FormatInfo
Dim strFormatName As String = String.Empty
Dim format As New WaveFormat
Dim iIndex As Integer
For iIndex = 0 To InputFormatSupported.Length - 1
If True = InputFormatSupported(iIndex) Then
'''' Turn the index into a WaveFormat then turn that into a
'''' string and put the string in the listbox
GetWaveFormatFromIndex(iIndex, format)
info.format = format
Formats.Add(info)
End If
Next iIndex
ListBox2.DataSource = Formats
End Sub ''''FillFormatListBox
Sub CreateRIFF()
''''*************************************************************************
''''
''''
'''' Here is where the file will be created. A
''''
'''' wave file is a RIFF file, which has chunks
''''
'''' of data that describe what the file contains.
''''
'''' A wave RIFF file is put together like this:
''''
''''
''''
'''' The 12 byte RIFF chunk is constructed like this:
''''
'''' Bytes(0 - 3) ''''R'''' ''''I'''' ''''F'''' ''''F''''
''''
'''' Bytes 4 - 7 : Length of file, minus the first 8 bytes of the RIFF description.
''''
'''' (4 bytes for "WAVE" + 24 bytes for format chunk length +
''''
'''' 8 b 上一页 [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)
|