Thanks for all the suggestions. I was able to get it working with unpack. The header occupies bytes 0-46 of the file and from there
read IN,$buffer,2;
$value = unpack('s',$buffer);
enclosed in a suitable loop yields the data values (for a 16-bit file).
I never was able to find Audio-Wav on Activestate. When I search using keyword "Audio" on Komodo/VPM, it doesn't show up. I tried the same thing with command line PPM and got same result. There is Audio-(Daemon, FLAC, Play-MPG123, PSID, Radio-V4L, SID, Tools, WMA) but no Wav.
Anyway, reading it as above is pretty straighforward so mission accomplished.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.