Quoting Fred Gleason <[email protected]>:
On Jan 14, 2012, at 08:35 53, Brooks Whiteford wrote:
Back in the day, when we got Rivendell running on some old Mac
G4's, I remember having a problem of endianness, since the PowerPC
processor is different from an x86 processor. At some point
something was added to the RD1 release that fixed that for us, and
we ran on the G4's for a few years after. Do you know if that
compatibility with big\little endian is still there?
Yup, sounds like an endian problem. A good bit of the code that
handles waveforms was reworked for 2.x.
I don't have easy access to big-endian hardware, but could you post
one of the files from '/var/snd' that exhibits the problem? That
should at least allow us to isolate it to either the capture or
display portion of the code.
Cheers!
Does anybody know if this was fixed in the later versions of RD2? We
are still on 2.0.2 and I compiled it on a G4 and I am having this
problem. I think it must be the data in the file, because the wave
files that were created on the little endian machines display fine in
"Edit Markers", but the one ripped on the PowerPC looks like noise.
I downloaded 2.5.2 and diff'd the rdwavefilexxxx.cpp files with 2.0.2
and did not see any changes that appeared to be endian related.
Thanks!
-Scott
I think I found the problem: in RDWaveFile::writeWave(void *buf,int
count) the *buf data is in processor order (I.E. correct order for the
processor) but the code treats it as if it is little endian data.
I also noticed something about that same code that may not work
correctly on all processors: the energy_data is unsigned short but the
data from *buf is assembled into the levl_accum variable which is
signed short. I'm not sure the comparison of the two will come out
correctly on all CPUs. I.E. a negative signed short (say 0xffff) will
be considered less than an unsigned short (say 0x0001).
I made changes to the code and it now works on the big endian (PowerPC
G4) machine. I have not tested it on a little endian machine yet.
I have no idea if there is any interest in this, if anyone is please
let me know.
Thanks,
-Scott
_______________________________________________
Rivendell-dev mailing list
[email protected]
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev