ronan
ronan

Reputation: 4672

RIFF header, but not a WAV Error in actionscript

Friends, I have just started usng actionscript and Im using the WaveContainer.as file from the location https://code.google.com/p/wami-recorder/source/browse/src/edu/mit/csail/wami/audio/WaveContainer.as?r=6804f729530892cb4f644b546f92c4f68fa402c8

that plays the uploaded files also. However it doent support all WAVE files for WAVE files that are not PCM formatted , I get the error that

1. FLASH:Not WAV: RIFF header, but not a WAV. 2. FLASH: Not Au: Not an AU header

Please guide on how the WaveContainer.as can be modified to handle above two errors

Upvotes: 0

Views: 238

Answers (1)

ZuzEL
ZuzEL

Reputation: 13655

Look at line number 94, since it has:

var waveFmtStr:String = header.readUTFBytes(8);       // "WAVEfmt "
                    if (waveFmtStr != "WAVEfmt ") 
                    {
                            return notWav("RIFF header, but not a WAV.");
                    }

you can change it by commenting return line like this:

// return notWav("RIFF header, but not a WAV.");

But somehow it is one of the ways to get something completely destroyed.


Generally, you should be looking for those error texts in your code, trying to understand why it is codded like this and what will happen if you change something.

Upvotes: 2

Related Questions