ytes for data chunk description + actual sample data size.)
''''
'''' Bytes(8 - 11) ''''W'''' ''''A'''' ''''V'''' ''''E''''
''''
''''
''''
'''' The 24 byte FORMAT chunk is constructed like this:
''''
'''' Bytes(0 - 3) ''''f'''' ''''m'''' ''''t'''' '''' ''''
''''
'''' Bytes 4 - 7 : The format chunk length. This is always 16.
''''
'''' Bytes 8 - 9 : File padding. Always 1.
''''
'''' Bytes 10- 11: Number of channels. Either 1 for mono, or 2 for stereo.
''''
'''' Bytes 12- 15: Sample rate.
''''
'''' Bytes 16- 19: Number of bytes per second.
''''
'''' Bytes 20- 21: Bytes per sample. 1 for 8 bit mono, 2 for 8 bit stereo or
''''
'''' 16 bit mono, 4 for 16 bit stereo.
''''
'''' Bytes 22- 23: Number of bits per sample.
''''
''''
''''
'''' The DATA chunk is constructed like this:
''''
'''' Bytes(0 - 3) ''''d'''' ''''a'''' ''''t'''' ''''a''''
''''
'''' Bytes 4 - 7 : Length of data, in bytes.
''''
'''' Bytes 8 -...: Actual sample data.
''''
''''
''''
''''**************************************************************************
'''' Open up the wave file for writing.
WaveFile = New FileStream(TextBox1.Text, FileMode.Create)
Writer = New BinaryWriter(WaveFile)
'''' Set up file with RIFF chunk info.
Dim ChunkRiff As Char() = {"R", "I", "F", "F"}
Dim ChunkType As Char() = {"W", "A", "V", "E"}
Dim ChunkFmt As Char() = {"f", "m", "t", " "}
Dim ChunkData As Char() = {"d", "a", "t", "a"}
Dim shPad As Short = 1 '''' File padding
Dim nFormatChunkLength As Integer = &H10 '''' Format chunk length.
Dim nLength As Integer = 0 '''' File length, minus first 8 bytes of RIFF description. This will be filled in later.
Dim shBytesPerSample As Short = 0 '''' Bytes per sample.
上一页 [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)
|