|
-
Jul 16th, 2015, 10:16 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Getting specific information from a file?
I open a wave file using
Open MyFile For Binary Access Read As #1
The file is a *.wav file and I want to read some specific information like channels, strings, etc...
To read how many channels the audio file contains I use:
Dim NumChannels As Integer
Get #1, 23, NumChannels
MsgBox NumChannels
I use the same formula for other kind of data, like long data type. The problem is when I try to do the same using a string.
For example, I want to get the string RIFF, (bytes 1,2,3 and 4 because it's written in the beginning of the file). And I get a msgbox without any value.
I get the RIFF string when I use
Dim X$
For N = 1 to 10
X$ = Input (4, #1)
MsgBox X$
Next N
With the RIFF no problem because it's at the beginning of the file, but if I want to get the WAVE string (bytes: 9,10,11 and 12) I've to read RIFF, (other string) and finally WAVE.
How can I access directly to the data I want without reading all the information before that string?
Tags for this Thread
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
|