Wednesday 28 November 2007

Sox problems and solutions

If you are doing any audio processing work under Linux, then Sox is a very useful tool to have. The Sox homepage refers to it as "the swiss army knife of sound processing programs".
Unfortunately the new release (14.0.0) has a problem under certain Linux distros.
The problem appears when processing .wav files (and maybe others) and shows up with an error message "Could not find data chunk". This is caused by the use of the "fseek0" function call instead of the previous "fseek" function call.
The solution is a simple one. In the src/misc.c file change the fseek0 function call to fseek ,then recompile and run make install. Worked a treat for me.

7 comments:

Anonymous said...

Thanks for the heads up :)

Anonymous said...

Cool, thanks. I installed sox-14.0.1 a couple hours ago and couldn't play wav files. Re-installed aftering changing fseeko to fseek and it plays wavs.

Anonymous said...

Thanks a lot. After a sox upgrade it was impossible to convert asterisk wav records to mp3. Now it works ! :)

Karthik B said...

Thanks a lot. The change makes it to work perfectly. :).

Unknown said...

Many thanks for that tip! :)

Anonymous said...

Thank you very much! This worked for me too. But what is the purpose of the "fseeko" function?

Unknown said...

in sox version 14.1 you must change fseeko to fseek in file formats_i.c (misc.c no longer exists)