Type WAVEHDR
lpData As String dwBufferLength As Long dwBytesRecorded As Long dwUser As Long dwFlags As Long dwLoops As Long lpNext As Long Reserved As Long End Type Type WAVEFORMAT wFormatTag As Integer nChannels As Integer nSamplesPerSec As Long nAvgBytesPerSec As Long nBlockAlign As Integer End Type Public wf As WAVEFORMAT, wh As WAVEHDR Public WBYTE() As Byte,lng as Long Sub Reverse(FileIN as string, FileOUT as string) Dim ub As Long, iR As Long, iB As Long Dim ff1 As Integer: ff1 = FreeFile On Error Resume Next Open FileIN For Binary Access Read As #ff1 Dim ff2 As Integer: ff2 = FreeFile Open FileOUT For Binary Access Write As #ff2 Get #ff1, , wh 'Grab the header Get #ff1, , wf 'Grab the format information. lng = LOF(ff1) ReDim WBYTE(lng), EWBYTE(lng) Get #ff1, , WBYTE() 'Len(wh) + Len(wf), WBYTE() iR = 0 For iB = UBound(WBYTE()) To 0 Step -1 EWBYTE(iR) = WBYTE(iB) iR = iR + 1 Next Put #ff2, , wh Put #ff2, , wf Put #ff2, Len(wh) + Len(wf), EWBYTE() Close #ff1 Close #ff2 End Sub |