[vorbis-dev] libao endian fix (attempt 2)

kcarnold at yahoo.com kcarnold at yahoo.com
Sat Sep 2 14:32:38 PDT 2000



On Sat, Sep 02, 2000 at 05:11:00PM -0400, kcarnold at yahoo.com wrote:
> On Sat, Sep 02, 2000 at 05:09:20PM -0700, volsung at asu.edu wrote:
> > Okay, here's the patch that should fix byte-ordering madness.  The basic rule
> > with libao is that samples have to be in native byte order.  All of the
> > drivers will assume this, and libao provides a ao_is_big_endian() function for
> > library clients (and sometimes drivers) to test their byte ordering.  I would
> > appreciate it if someone on a big endian platform test ogg123 and make sure
> > that it works correctly with the oss, esd, alsa, and wav output drivers.
> > 
> > As before, please email me if you commit this patch to CVS.
> > 
> > Thanks.
> > 
> > ---
> > Stan Seibert
> 
> Applied locally; I am going to test it on the PowerMac in the basement. If it
> works, you'll know. If it doesn't, there will be consequences...

Start thinking about the consequences:

(commands from memory; data from real files)
on my computer (x86):
# cd /usr/share/music/ogg/
# ogg123 -d wav blueperiod_itsover.ogg # it's what I had on hand, okay?
on the mac (after the necessary copy, recompile, etc.)
# ogg123 -d wav blueperiod_itsover.ogg
then back on my computer:
# scp powermac:/root/output.wav output-mac.wav
# head -c 100 output.wav | hexdump
0000000 4952 4646 f644 02aa 4157 4556 6d66 2074
0000010 0010 0000 0001 0002 ac44 0000 b110 0002
0000020 0004 0010 6164 6174 f620 02aa ffd4 ffd8
0000030 ffdf ffe2 fffd ffec ffe2 ffbe ffc7 ffb4
0000040 ffb2 ffb6 ffab ffc2 ffb6 ffdf ffbc ffe0
0000050 ffcb ffef ffb7 fff1 ffa0 ffd8 ffc2 ffe4
0000060 ffd1 ffe2
0000064
# head -c 100 output-mac.wav | hexdump
0000000 4952 4646 f644 02aa 4157 4556 6d66 2074
0000010 0010 0000 0001 0002 ac44 0000 b110 0002
0000020 0004 0010 6164 6174 f620 02aa d4ff d8ff
0000030 dfff e2ff fdff ecff e2ff beff c7ff b4ff
0000040 b2ff b6ff abff c2ff b6ff dfff bcff e0ff
0000050 cbff efff b7ff f1ff a0ff d8ff c2ff e4ff
0000060 d1ff e2ff
0000064

Look a little swapped?

Fix wave output, and get back to me ;)

Kenneth

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis-dev mailing list