[vorbis-dev] Vorbize.c

volsung at asu.edu volsung at asu.edu
Wed Aug 30 21:17:16 PDT 2000



> 1. How do I tell vorbisfile ( / libvorbis ) that I want the data in host byte
> order?
> 
> 2. I assume that at least a majority of sound output mechanisms like data in
> host byte order. Correct?
> 
> 3. Is libao byte-order safe?
> 
> Third I'll figure out by myself unless I get any explicit evidence either way.

I'll go ahead and answer this since this is mostly my fault anyway.  :)

I got bogged down earlier before I could implement the byte-order fix.  
Basically libao is *not* byte order safe and here's how I want to fix it:

1. Since some drivers can't explicitly set the byte order, such as ESD and
Solaris, libao should probably standardize on native byte order for
simplicity.

2. Put a function like is_big_endian() (or whatever it's called) from
vorbisfile into audio_out.c in libao.  This is to preserve the independence of
libao so that it does not depend on vorbisfile.

3. Use this function in ogg123 to set vorbisfile to perform native byte order
decoding.

4.  Use this function in appropriate drivers (ALSA, WAV, OSS) to either set
the device to use native byte-order, or to figure out what to do with the
samples that are received.

I have an almost-fix on my hard drive already.  If you are willing to wait
until the weekend, I can fix it all the way and post it.


---
Stan Seibert

--- >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