[vorbis-dev] Ogg Vorbis and Java

Greg Holt greg at Brim.Net
Sat Dec 16 09:55:32 PST 2000


Okay guys,

I've completed a first run at integrating the Ogg Vorbis libraries and
Java together. The tarball's pretty small, so I just figured I'd post it
to the list. Who should I normally send this sort of thing to? Assuming,
of course, you guys even want to distribute it.

This preliminary version is only usable on Red Hat Linux as far as I know.
I'm hoping I can convince Aaron to generate a vorbis_j.dll for Windows and
hopefully it won't be too hard to compile on other OSes.

Anyway, on with what it does. I've created a VorbisFile interface and a
VorbisPlayer interface with default implementations. These implementations
call native code which uses the Ogg Vorbis libraries to accomplish their
tasks. I also included a *very* simple GUIPlayer as sort of an example on
usage. It isn't exactly a pretty looking player, but it does accomplish a
proof-of-concept.

The VorbisFile has what you'd expect for methods for retrieving the file
version, number of channels, bit rates, total time, and comments. It
doesn't allow updating the comments yet, but it will at some point.

The VorbisPlayer simply allows you to play a VorbisFile, check if it's
currently playing, get the current position in the song, pause it, seek to
different positions, stop it from playing, and start playing a different
file. You can construct it with whatever AO device you want to use. It
doesn't do play lists or anything like that; those sorts of things will be
in other classes.

There was only one problem I ran into (other than the one you guys solved
for me before). Understand that I am using the Beta 3 RPM packaged
libraries. The problem I ran into was that I could not call ao_shutdown()
and then call ao_initialize() again later without segfaulting. So, now I
call ao_initialize() once and I never actually call ao_shutdown().


--
Greg



<HR NOSHADE>
<UL>
<LI>APPLICATION/X-GZIP attachment: vorbis-j-0.0.0.tar.gz
</UL>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vorbis-j-0.0.0.tar.gz
Type: application/octet-stream
Size: 6162 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/vorbis-dev/attachments/20001216/332e0154/vorbis-j-0.0.0.tar.obj


More information about the Vorbis-dev mailing list