[vorbis] [PATCH] aiff file reader
Michael Smith
msmith at labyrinth.net.au
Sun Jan 19 20:48:04 PST 2003
Monty <xiphmont at xiph.org> said:
>
>
>
> On Mon, Jan 20, 2003 at 10:04:07AM +1100, Michael Smith wrote:
> > On Monday 20 January 2003 04:50, Giuliano Pochini wrote:
> > > Sound samples in AIFF/AIFC files are big-endian by default.
> > >
> > >
> > > --- vorbis-tools/oggenc/audio.c.orig Sun Jan 19 17:22:10 2003
> > > +++ vorbis-tools/oggenc/audio.c Sun Jan 19 17:44:56 2003
> > > @@ -249,6 +249,7 @@
> > > format.totalframes = READ_U32_BE(buffer+2);
> > > format.samplesize = READ_U16_BE(buffer+6);
> > > format.rate = (int)read_IEEE80(buffer+8);
> > > + aiff->bigendian = 1;
> > >
> > > if(aifc)
> > > {
> > >
> > >
> > >
> > > Bye.
> >
> >
> > Thanks for the patch, committed.
> > Obviously, not many people have been using AIFF input...
>
> Actually, from my dusty recollection of Apple's spec documents,
> AIFF[-C] can be either, make sure the header is checked. It's RIFF
> PCM that's always little endian and never big.
>
> Monty
Monty,
Do you have any references for this spec? My header reading code here doesn't
seem to know about anywhere that endianness can be set. It _does_ have two
options for endianness for AIFC (rather than plain AIFF), though.
I think I originally adapted this code from the old (really old! :-)
pre-vorbis ogg encoder (at least partially), so I suspect it's as correct
(w.r.t. endianness) as that was.
Mike
--- >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-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
mailing list