question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Invalid WAV file - No fmt chunk found

See original GitHub issue

Hello, I’m using the WaveFileReader to read a particular wav and keep running into this error:

Invalid WAV file - No fmt chunk found

I’m trying to determine what could cause this or what’s wrong with my .wav file. If I look at WaveFileChunkReader Line 37 I see that

this.riffSize = br.ReadUInt32();

Is returning 0, as opposed to my other .wav files where this number is much larger. I have verified that my stream is not empty and set to Position = 0. Any ideas what would cause this or what this means? Is there a good tool I can use to analyze the makeup of a particular wav file? It seems to play fine in VLC.

                using (WaveFileReader wavFileReader = new WaveFileReader(wavFile))
                {

}

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
mb2140commented, Aug 7, 2016

Doh! Wasn’t closing my WaveWriter properly.

0reactions
markheathcommented, Feb 13, 2019

Please see my reply on your other github issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

Invalid wav file no fmt chunk found after recording using ...
1 Answer. You need to dispose your WaveFileWriter objects before they are ready to be played. Doing so will update the chunk sizes...
Read more >
[Solved]-Invalid wav file no fmt chunk found after recording ...
You need to dispose your WaveFileWriter objects before they are ready to be played. Doing so will update the chunk sizes in the...
Read more >
Malformed or truncated chunk found at 2459694 bytes ...
I have been having problem when converting .wav to .flac every now and then. While most files can convert without any error/warning, some...
Read more >
Wav File Header Data not being created properly
The “junk chunk” is a real thing in the full WAV format and the Juce writer puts that into the file. It's not...
Read more >
naudio Work Item Rss Feed - RSSing.com
I was attempting to convert several wav files to mp3 files when I came across this ... throw new FormatException("Invalid WAV file -...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found