vb在编写录音时,下面含义什么怎么理解录音格式
下面这些代码什么意思,我看不懂,谁能解释一下btwfxout(0).......btWfxOut(29)含义
Private Const WFXSize As Long = 128& * 1024&
Private btWfxOut() As Byte
Private lngWFXOutLen As Long
Public Sub SelectFormatMp3() '32K 16bit mono Mp3
ReDim btWfxOut(WFXSize - 1) As Byte
btWfxOut(0) = 85
btWfxOut(1) = 0
btWfxOut(2) = 1
btWfxOut(3) = 0
btWfxOut(4) = 34
btWfxOut(5) = 86
btWfxOut(6) = 0
btWfxOut(7) = 0
btWfxOut(8) = 160
btWfxOut(9) = 15
btWfxOut(10) = 0
btWfxOut(11) = 0
btWfxOut(12) = 1
btWfxOut(13) = 0
btWfxOut(14) = 0
btWfxOut(15) = 0
btWfxOut(16) = 12
btWfxOut(17) = 0
btWfxOut(18) = 1
btWfxOut(19) = 0
btWfxOut(20) = 2
btWfxOut(21) = 0
btWfxOut(22) = 0
btWfxOut(23) = 0
btWfxOut(24) = 104
btWfxOut(25) = 0
btWfxOut(26) = 1
btWfxOut(27) = 0
btWfxOut(28) = 113
btWfxOut(29) = 5
lngWFXOutLen = CLng(18) + CLng(12)
End Sub
Public Sub SelectFormatWav() 'PCM 16bit 22K mono
ReDim btWfxOut(WFXSize - 1) As Byte
btWfxOut(0) = 1
btWfxOut(1) = 0
btWfxOut(2) = 1
btWfxOut(3) = 0
btWfxOut(4) = 17
btWfxOut(5) = 43
btWfxOut(6) = 0
btWfxOut(7) = 0
btWfxOut(8) = 34
btWfxOut(9) = 86
btWfxOut(10) = 0
btWfxOut(11) = 0
btWfxOut(12) = 2
btWfxOut(13) = 0
btWfxOut(14) = 16
lngWFXOutLen = CLng(18) + CLng(0)
End Sub
Private Sub WriteWAVHdr()
Dim udtHdr As WAVRIFF
Dim lngDataID As Long
Dim lngData As Long
With udtHdr
.RIFF = WAV_RIFF
.WAVE = WAV_WAVE
.fmt = WAV_FMT
.hdrlen = FileLength(hFOut) - 8
.chnksize = lngWFXOutLen
End With
FileSeek hFOut, 0, FILE_BEGIN
FileWrite hFOut, VarPtr(udtHdr), Len(udtHdr)
FileWrite hFOut, VarPtr(btWfxOut(0)), lngWFXOutLen '这个地方就是是将文件头写入,不同类型数据不一样
lngDataID = WAV_DATA
FileWrite hFOut, VarPtr(lngDataID), 4
lngData = FileLength(hFOut) - (FilePosition(hFOut) + 4)
FileWrite hFOut, VarPtr(lngData), 4
End Sub --------------------编程问答-------------------- 你使用UEDIT各打开一个MP3文件与WAV文件,看看对应字节的头部吧. --------------------编程问答-------------------- 友情Up................
--------------------编程问答-------------------- 对应字节的头部怎么看?请各位大哥赐教 --------------------编程问答-------------------- 推荐用NCTAudioStudio控件处理声音。 --------------------编程问答-------------------- 用vb编写录音软件时,如何直接使用mpeg layer-3 16kbit/s 11025Hz ,因为它的文件大小很小
补充:VB , API