[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: gramofile wav format not accepted by other sound programs



On Mon, 24 Jan 2005 22:20:07 +1100
Nick Croft <nicko@acay.com.au> wrote:

NC> Hello
NC> 
NC> I've been using gramofile OK on i386 machines. Trying to do the same
NC> with myh Pismo using debian-powerpc, I am able to record and play
NC> ``wav'' files within gramofile, but cannot open edit convert or play
NC> them with other programs.
NC> 
NC> Typical error msg:
NC> 
NC> Warning: INVALID format chunk in wav header.  Trying to read anyway
NC> (may not work)... Warning: Unexpected EOF in reading WAV header
NC> ERROR: Input file  is not a supported format
NC> 
NC> I've tried sweep, sox, play, oggenc, glame.
NC> 
NC> Also did a dist-upgrade in case something was missing.
NC> 
NC> It must be that the debianppc version produces something
NC> unacceptable in its output. After waiting to see if anyone here can
NC> help, my next step will be to compile from source.

I haven't looked at the gramofile source code lately, but I think I can
make a pretty good stab at what's going on, based on the following.
1) .wav is a little-endian format.
2) PPC is a big-endian architecture.
3) Gramofile has RYO .wav reading/writing routines (copied out of
another sound tool [I forget which--the code does say]).
4) Most more-recently updated/maintained sound tools now use libsndfile
and other standard sound libraries which didn't exist when gramofile was
written.
5) At the time when gramofile was written, Linux on non-x86 platforms
was uncommon.

Therefore I guess that gramofile is writing big-endian wav files,
whereas all the other tools are assuming that the files are
little-endian and swapping the bytes, thus getting silly numbers from
the header -- just be thankful they don't get as far as sending anything
to your speakers as the results could be harmful to them and to your
ears.

As far as getting anything done about it -- I wouldn't hold you breath;
to be perfectly honest it is legacy software. For recording, I usually
use arecord from the command line these days and gwc for denoising.

James

-- 
+------------------------+-------------------------------+---------+
| James Tappin           | School of Physics & Astronomy |  O__    |
| sjt@star.sr.bham.ac.uk | University of Birmingham      | --  \/` |
| Ph: 0121-414-6462. Fax: 0121-414-3722                  |         |
+--------------------------------------------------------+---------+



Reply to: