Solving MATLAB Error wavread: Incorrect Chunk Size Info

  • Context: MATLAB 
  • Thread starter Thread starter Sahand_S
  • Start date Start date
  • Tags Tags
    Matlab
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 5K views
Sahand_S
Messages
2
Reaction score
0
Hi.

I tried to use wavread comment but on some wave files, it showed me following error:

Code:
? Error using ==> wavread at 166
Incorrect chunk size information in WAV file.

Please help me. thanks a lot.
 
Physics news on Phys.org
This is where it finds the error
Code:
 if fseek(fid,ck.Size,0) == -1
         error('wavread:InvalidFile', ...
             'Incorrect chunk size information in WAV file.');
      end

This is what sends the error

Code:
 catch exception
    fclose(fid);
    throw(exception);  % line 166
end

So yeah, sorry I can't be more help, but you need to look at the first bit of code as this is where it finds an error. (fseek line)