i made my own files instead of making them in Audacity. i think the problem is that Audacity does strange stuff. it is really an editor for audio files and there does not seem to be much concern with the accuracy of single samples. i sort of remember running into this sort of problem in the past. for example, it does not like DC offsets and tries to fix things up at the end of a file. it seems that when it makes "silence" there is some jitter about 0. there are possibly some other quirks. i tried the code you provided and it works just the same as mine although it is a little more elegant. thanks for helping me to see that there is really nothing wrong on the Perl side of things.

In reply to Re^4: Audio::WAV data problem by spencoid
in thread Audio::WAV data problem by spencoid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.