Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Binary data or something like that :-)
Message
From
08/10/2006 08:40:43
 
 
To
07/10/2006 13:16:12
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01160337
Message ID:
01160386
Views:
8
>I'd like to know the lenght in seconds of a wav file.
>
>I have found how it is recorded but i cannot interpretate it.
>
>the structure of the file is :
>
>
>RIFF format (12 bytes)
>
>0 - 3     "RIFF" (ASCII Characters)
>
>4 - 7     Total Length Of Package To Follow (Binary, little endian)
>
>8 - 11     "WAVE" (ASCII Characters)
>
>
>FORMAT sector (24 bytes in length total)
>
>0 - 3     "fmt_" (ASCII Characters)
>
>4 - 7     Length Of FORMAT Chunk (Binary, always 0x10)
>
>8 - 9     Always 0x01
>
>10 - 11     Channel Numbers (Always 0x01=Mono, 0x02=Stereo)
>
>12 - 15     Sample Rate (Binary, in Hz)
>
>16 - 19     Bytes Per Second
>
>20 - 21     Bytes Per Sample: 1=8 bit Mono, 2=8 bit Stereo or 16 bit         Mono, 4=16 bit Stereo
>
>22 - 23     Bits Per Sample
>
>so my problem is how to read binary data.
>For example what should I do to have the Total Length Of Package bytes 4 to 7 of the string ?
>
>thanks
>Alessio
? CTOBIN(SUBSTR(FILETOSTR(GETFILE("wav")),5,4),"4rs")
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform