9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Mathieu Lonjaret <lejatorn@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: [9fans] Ogg/Vorbis ported
Date: Wed, 28 Jan 2009 18:53:16 +0100	[thread overview]
Message-ID: <16ff6b980901280953s17a7e041s1b605290b365b0e9@mail.gmail.com> (raw)

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



             reply	other threads:[~2009-01-28 17:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-28 17:53 Mathieu Lonjaret [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16ff6b980901280953s17a7e041s1b605290b365b0e9@mail.gmail.com \
    --to=lejatorn@gmail.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).