9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Ogg/Vorbis ported
@ 2009-01-28 17:53 Mathieu Lonjaret
  2009-01-28 18:22 ` hiro
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Mathieu Lonjaret @ 2009-01-28 17:53 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Hello all,

Subject says it all; as my first port I did libogg and libvorbis.

I did it mainly as a learning exercise, so it's far from perfect, but
both the libs compile as well as the simple encoder and decoder from
the 'examples' dir.
I have not tried the encoder, but the decoder seems to be running fine
like that:
cat somefile.ogg | ./decoder_example > /dev/audio

I did no try to rework things, like the types for example (as it was
done for libmad/mp3dec in rsc's contrib), I limited myself to fix
things the best I could until it built fine. So constructive
criticism, remarks, comments, are of course welcome please. In
particular, I'm not sure about these various things I did:
1) changed all the alloca calls to some malloc/free
2) added a rint function
3) commented out most of the #if defined ... (seemed safe since most
were gnuisms, gcc, or win32 specific).
4) the 'max' and 'min' vars seemed to pose a problem (although I
wasn't able to find them already defined on plan9), so renamed them to
things like local_max.
5) created some new headers and moved some code in there to make it cleaner.
6) the various locations I set in the mkfile to install things.
Also, the weirdest I think was these 3 extern funcs:  floor1_fit,
floor1_interpolate_fit, floor1_encode which were declared with a void
* as one of the args, but which were used with a struct * instead.
Seems like fixing the declarations and moving them to a header made
things build fine but I'm not sure of what was the initial intent
here.

They're hosted as indicated below at the moment, but if they're not
deemed worthless, could I have a contrib dir so they can be installed
with fgb's replica please?

http://www.ipgp.jussieu.fr/~lonjaret/libogg.tar.gz
http://www.ipgp.jussieu.fr/~lonjaret/libvorbis.tar.gz

Next should be a decent player, and other of the vorbis-tools, if I
can get around the ncurses dependency.

Thanks to rsc for 9vx (haven't tested on native plan9 btw), and to
sqweek and quintile for their advices.

Cheers,
Mathieu

--
GPG key on subkeys.pgp.net:

KeyID:   | Fingerprint:
683DE5F3 | 4324 5818 39AA 9545 95C6 09AF B0A4 DFEA 683D E5F3



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-02-23 10:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-28 17:53 [9fans] Ogg/Vorbis ported Mathieu Lonjaret
2009-01-28 18:22 ` hiro
2009-01-29 16:27 ` ron minnich
2009-01-29 20:27   ` [9fans] porting GNU code Steve Simon
2009-01-29 20:30     ` erik quanstrom
2009-01-29 20:35       ` Steve Simon
2009-01-29 22:47   ` [9fans] Ogg/Vorbis ported Mathieu
2009-01-30  4:38     ` lucio
2009-01-30 16:21       ` erik quanstrom
2009-02-23 10:05 ` lejatorn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).