#93 SoX v14.0.0 cannot read .WAV files

closed
nobody
None
5
2008-01-27
2007-11-01
No

Using several Intel Pentium I and III platforms running basically Slackware 10.x Linux installations, running either GCC 4.1.0 (and possibly 3.x.x) along with Linux kernel v2.6.x, SoX v14.0.0 fails to read .wav files, and instead exits with an error:

play soxio: Failed reading `psk.wav': Could not find data chunk.

SoX seems to process .au and .mp3 files without a problem.

Suspecting this might be a .wav file issue, I used the "rec" command to generate a sample .wav file that the "play" command cannot read:

rec -r 44100 test.wav
play soxio: Failed reading `test.wav': Could not find data chunk.

The monkey.wav file produces the same error.

I tried commenting out the data chunk "if" check on or about line 816 in src/wav.c. This allowed SoX to read the file and display data size information, but the program quickly exits after this without reading the file any further.

So, the error trap appears to be working properly, but the "len" or the "dwDataLength" variables might be in error, causing the program to exit prematurely.

No previous versions of SoX I've used in the past suffered from this problem.

Discussion

  • robs

    robs - 2007-11-03

    Logged In: YES
    user_id=27473
    Originator: NO

    Thanks for the detailed report. I'm afraid nothing jumps out as being the obvious cause, but we'll do our best to look into it.

     
  • Silvan Minghetti

    Logged In: YES
    user_id=41414
    Originator: NO

    I have the exact same problem with gcc-3.4.6, glibc-2.3.6. And I have
    found the actual cause of the problem: It's in misc.c:sox_seeki(...)
    function.

    While compiling, I get these errors:

    ../../src/src/misc.c: In function `sox_tell':
    ../../src/src/misc.c:168: warning: implicit declaration of function `ftello'
    ../../src/src/misc.c: In function `sox_seeki':
    ../../src/src/misc.c:502: warning: implicit declaration of function `fseeko'

    I don't know why they aren't declared. However. Instead of using fseeko/ftello,
    it really should be using fseeko64/ftello64. Manually changing that does indeed
    fix the problem, but it's not a correct solution (and I still get errors of those
    not being declared).

     
  • robs

    robs - 2008-01-27
    • status: open --> closed
     
  • robs

    robs - 2008-01-27

    Logged In: YES
    user_id=27473
    Originator: NO

    All SoX issues in this area are now believed fixed (in 14.0.1).

     

Log in to post a comment.