[Vorbis-dev] Introducing ov_open_callbacksp and ov_clearp

Monty xiphmont at xiph.org
Tue Sep 7 07:49:54 PDT 2004




On Tue, Sep 07, 2004 at 10:34:58AM +0200, Armel Asselin wrote:
> Hello,
> 
> I've been looking to the libvorbisfile and got into troubles when trying to
> use it: I need to compile it on a PalmOS and the libvorbisfile must be
> compiled in ARM whereas calling code is in 68K. This implies that the
> interface ov_open_callback is not usable because the OggVorbis_File *vf must
> point to something in the target architecture (ARM) whereas the caller
> cannot do that.

If this is the case, not even the calling convention between the
codeblocks is standard C.  Embedded architectures generally == 'all
bets are off'.

> As well as for this I need a ov_info_basic function so that no internal
> structure is returned (which seems to me a somewhat bad design because
> you'll get stuck with that: each time an internal modification will occur,
> outer code may have to be fixed or re-compiled).

This 'internal structure' as you describe it is fixed by the Vorbis
specification.  It won't change unless the specification changes, and
the specification today is fixed.

> I propose to add that to vorbisfile.h:

Your suggestion is not without some merit.  On the other hand, it very
nearly counts as a trivial change and is of limited usefulness to
others.  You'd be able to keep this snippet for your own code without
fear of a maintainability explosion.

(BTW, your 'p' suffix collides with an older convention where '_p'
means 'this function is a query'.  Elsewhere in the Ogg code, the
convention is to call these functions 'create' and 'destroy' rather
than 'init' and 'clear'.)

Monty


More information about the Vorbis-dev mailing list