[PD-dev] [wavinfo] on Darwin broken?
Mathieu Bouchard
matju at sympatico.ca
Mon Feb 24 19:18:20 CET 2003
On Mon, 24 Feb 2003, Hans-Christoph Steiner wrote:
> So it seems that [wavinfo] from ext13 is broken on Darwin/MacOS X,
> which sucks for me since its a key part of a project I am working on
> and I just bought a new PowerBook. When I run the help patch, and open
> a file with
> 116736 samples 1 channel 16-bit 44100 rate
> [wavinfo] says:
> 72.0059 samples 256 channels 4096-bit 1.15212e+09 rate
> Does it work for anyone else? I am going to take a look at it when I
> get a chance, but I just thought I'd run it by the list to see if
> anyone has any ideas.
This is a byte order problem.
1.15212e+09 is 1152120000 which is probably 1152122880 rounded, which is
hex "44 ac 00 00"
44100 is hex "00 00 ac 44"
this is because the program assumes that the CPU reads a 4-byte number
like a pentium would, but a powerpc is the other way around.
channels and bits fit that pattern, but the number of samples looks
weirder though it's probably just a less-obvious manifestation of the same
problem.
________________________________________________________________
Mathieu Bouchard http://artengine.ca/matju
More information about the Pd-dev
mailing list