MATLAB Solving MATLAB Error wavread: Incorrect Chunk Size Info

  • Thread starter Thread starter Sahand_S
  • Start date Start date
  • Tags Tags
    Matlab
AI Thread Summary
The discussion centers around an error encountered while using the wavread function in MATLAB, specifically the "Incorrect chunk size information in WAV file" message. The issue arises during the fseek operation, where the function attempts to seek a position in the file based on the chunk size. If the chunk size is incorrect, it triggers an error, leading to the closure of the file and the rethrowing of the exception. The user seeks assistance in resolving this error, indicating that the problem lies within the initial part of the code related to file handling. The focus is on understanding and fixing the chunk size information in the WAV file to prevent the error from occurring.
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)
 
Thanks a lot.
 

Similar threads

Back
Top