gregor-e has asked for the wisdom of the Perl Monks concerning the following question:

I installed Audio::Wav and tried the Audio::Wav::Write sample program given in the synopsis of its perldoc, which appears to create a 1-channel sine wave .wav file.

When I attempt to play the generated file using Winamp, I get a dialog that complains "Waveform-audio file has no 'FMT' chunk".

Does anyone know how I can use Audio::Wav::Write to generate a .wav file that can be played?

Replies are listed 'Best First'.
Re: FMT chunk?
by larryk (Friar) on Jun 18, 2001 at 19:10 UTC
    This may be a silly question but have you tried any other players except Winamp?
    The best I could do to explain the error is a link to WAV File Format.

    Hope this helps

    "Argument is futile - you will be ignorralated!"

      Yeah, I tried Windoze Media Player, and it complained that no combination of filters could be found to play the file.

      As I understand it, the FMT chunk is a required field in RIFF WAV files. Strikes me odd the Audio::Wav::Write example doesn't write it. Must be a problem of shifting standards.

      Thanks for the link to WAV format. I'll see if I can gin up a proper FMT chunk.

        Have you had a look at the lengthily-named Audio::Wav::Write::Header ??
        A slightly more useful link.

        "Argument is futile - you will be ignorralated!"