You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes WAV encoders might add an additional 'JUNK' chunk into .wav files to ensure byte alignment with the pcm data (so I'd think at least). 'JUNK' chunk might appear before 'fmt ' chunk, and therefore some action should be taken, to prevent the decoder from failing.
My suggestion is to read 4 bytes, compare it to 'JUNK' first, if it exist then read the next four bytes to acquire the chunk size, and then skip the number chunk size bytes, and then proceed to deal with 'fmt ' chunk. If the 'JUNK' chunk didn't exist, seek back last 4bytes, and then proceed read and to deal with 'fmt ' chunk.
The text was updated successfully, but these errors were encountered:
Sometimes WAV encoders might add an additional 'JUNK' chunk into .wav files to ensure byte alignment with the pcm data (so I'd think at least). 'JUNK' chunk might appear before 'fmt ' chunk, and therefore some action should be taken, to prevent the decoder from failing.
My suggestion is to read 4 bytes, compare it to 'JUNK' first, if it exist then read the next four bytes to acquire the chunk size, and then skip the number chunk size bytes, and then proceed to deal with 'fmt ' chunk. If the 'JUNK' chunk didn't exist, seek back last 4bytes, and then proceed read and to deal with 'fmt ' chunk.
The text was updated successfully, but these errors were encountered: