From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 3747 invoked from network); 13 Nov 1998 00:01:34 -0000 Received: from mail.redhat.com (199.183.24.239) by mail2.redhat.com with SMTP; 13 Nov 1998 00:01:34 -0000 Received: from mail.inreach.com (mail.inreach.com [209.142.0.3]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id TAA06186 for ; Thu, 12 Nov 1998 19:01:34 -0500 Received: from ann.qtpi.lakewood.ca.us (root@206-18-112-31.la.inreach.net [206.18.112.31]) by mail.inreach.com (8.8.8/8.8.6/(InReach)) with ESMTP id PAA28096 for ; Thu, 12 Nov 1998 15:52:25 -0800 (PST) Received: from ann.qtpi.lakewood.ca.us (brtaylor@localhost [127.0.0.1]) by ann.qtpi.lakewood.ca.us (8.8.7/8.8.7) with ESMTP id PAA08982 for ; Thu, 12 Nov 1998 15:50:07 -0800 Message-Id: <199811122350.PAA08982@ann.qtpi.lakewood.ca.us> X-Mailer: exmh version 2.0.2 From: Bob Taylor To: axp-list@redhat.com Subject: Re: Sound installed but now what??? In-reply-to: Your message of "Thu, 12 Nov 1998 20:17:15 GMT." <364B424B.2B659C4B@paralleldata.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 12 Nov 1998 15:50:07 -0800 Sender: brtaylor@inreach.com In message <364B424B.2B659C4B@paralleldata.com>, "Wes Bauske" writes: > Bob Taylor wrote: > > > > In the file au.c: > > > > #define SUN_MAGIC 0x2e736e64 /* Really '.snd' */ > > #define SUN_INV_MAGIC 0x646e732e /* '.snd' upside-down */ > > . > > . > > #define SUN_HDRSIZE 24 /* Size of minimal header * >/ > > . > > #define SUN_ULAW 1 /* u-law encoding */ > > > > If SUN_INV_MAGIC is found then swap is set to 1. The header of a .au file > > is: > > > > .snd^@^@^@(^@^@dT^@^@^@^A > > > > where > > > > .snd = SUN_MAGIC > > ^@^@^@( = SUN_HDRSIZE > > ^@^@dT = data size > > ^@^@^@^A = SUN_ULAW (encoding) > > > > I think I just saw a mistake, the SUN_HDRSIZE and SUN_ULAW should be 24L > > and 1L? Anyway the error is reported on the encoding. > > > > The header seems to be big endian. > > > > OK now I see how there might be some confusion. > Whether a particular file format is big endian or > little endian is up to the creator of the format. > > This does not mean the machine you use it on is > the same endianess. Given the specification of > the file format, one can easily convert between > endianess and do whatever one likes with the file. > However, no matter what endian system you have, you > must have code in the program to take care of > that problem. I do the same thing in my own code. > In much of the file formats used in the petroleum > industry, big endian wins out because when the > format was created, the creator happened to be on > a big endian system. So, whenever I have to read > those formats on Intel/Alpha, I have to swap bytes > around to make any sense of the data. > > So you need to worry about both the endianess of > the machine and the endianess of the file and have > code to make them match up or you get nonsense. Quite true. However, sox looks at the MAGIC 4 bytes as a long, compares that with the #define and determins endianess from that. It appears that the correct endianess is detected (at least the error message is not printed). Where I get a failure is the encoding code. The SUN_ULAW is not detected and the case falls through to the default case printing the error message. I read an email on this list where someone is running sox fine on their Red Hat 5.1 Alpha. I just rebuilt sox from the sox src rpm from my 5.1 CD and still get the same error. It is not worth my time to continue with this. I will try the sox with 5.2. Thanks everyone for your comments! Bob -- +---------------------------------------------------------------+ | Bob Taylor Email: brtaylor@inreach.com | |---------------------------------------------------------------| | Like the ad says, at 300 dpi you can tell she's wearing a | | swimsuit. At 600 dpi you can tell it's wet. At 1200 dpi you | | can tell it's painted on. I suppose at 2400 dpi you can tell | | if the paint is giving her a rash. (So says Joshua R. Poulson)| +---------------------------------------------------------------+