MATLAB wavread error with incorrect chunk size information

  • Context: MATLAB 
  • Thread starter Thread starter Sahand_S
  • Start date Start date
  • Tags Tags
    Matlab
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
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)