|
-
May 23rd, 2004, 06:24 PM
#1
Thread Starter
yay gay
How to convert this?
VB Code:
Open lpMP3File For Binary As #1
Get #1, 1, Buf
Close #1
to VB.NET?
\m/  \m/
-
May 23rd, 2004, 07:17 PM
#2
Sleep mode
If I understand that vague function correctly , then it reads a binary file . Then , starts reading from the first byte (if it's not zero-based function) for 1 byte and save it in the Buf variable (which I suppose it's byte array) .
Based on this , this is how it should be in .NET .
VB Code:
Dim byts(1) As Byte
Dim strem As IO.Stream = New IO.FileStream("c:\xxx.LLL", IO.FileMode.Open)
strem.Read(byts, 1, 1)
strem.Close()
For Each s As Byte In byts
MessageBox.Show(s.ToString)
Next
-
May 23rd, 2004, 07:28 PM
#3
Thread Starter
yay gay
ok here is a bigger part of the code, I'm showing this as I think the buffer must have at least 4096 bytes
VB Code:
Dim Buf As String '* 4096
Dim infoStr As String '* 3
Dim lpVBRinfo As VBRinfo
Dim tmpByte As Byte
Dim tmpNum As Byte
Dim i As Integer
Dim designator As Byte
Dim baseFreq As Single
Dim vbrBytes As Long
Open lpMP3File For Binary As #1
Get #1, 1, Buf
Close #1
For i = 1 To 4092
If Asc(Mid(Buf, i, 1)) = &HFF Then
tmpByte = Asc(Mid(Buf, i + 1, 1))
If Between(tmpByte, &HF2, &HF7) Or Between(tmpByte, &HFA, &HFF) Then
Exit For
End If
End If
Next i
\m/  \m/
-
May 23rd, 2004, 09:28 PM
#4
Sleep mode
Ok , whatever the buffer size is , the idea is stil the same .
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|