[vorbis-dev] Re: [vorbis] Finally, it can be told!

Andrew Chatham andrew.chatham at duke.edu
Fri Aug 31 11:33:49 PDT 2001



(sending to vorbis-dev instead)

On a related note, last night I updated the ao-python module to work with the
new API (I think; it works on my computer). I also fixed some little things in
the vorbis-python and ogg-python modules. Some function names in ao-python
changed just a little bit. I'll make new tarballs, up version numbers, and
whatnot later.

I agree that the current Ogg et al Python bindings have a more complicated API
than most Python programmers would be used to. A lot of this had to do with
trying to make things as fast as I could in Python, particularly when passing
around buffers. You can actually encode Vorbis files using my Python
extensions, but actually reading out the PCM values from the WAV file in Python
takes more time than is spent actually encoding that data in the Vorbis
library.

For just playing a Vorbis file, both seem to be about as simple, the main
difference being that in vorbis-python, you have a line like:

(buff, bytes, bit) = vf.read(SIZE) # from short.py

and in Ignacio's, you have:

a = t.readframes(count) # from testvorbis.py

which looks a bit easier to me, and if it matches an existing API for Python,
that's good too. Comment reading in simple cases is probably easier in his,
too, whereas mine has this weird dictionary of tuples thing that has raised a
few questions but is the most correct way I can think of doing it. 

It probably wouldn't be very hard to implement most of this in actual Python
script on top of the existing modules, which seems to be how many Python
modules go about doing things. Or if there are specific advantages of his C
functions, those could be merged into the existing modules, or he can just keep
doing it on his own, which is cool too.

Andrew


-- 
Andrew Chatham
Duke University '02
andrew.chatham at duke.edu

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