[speex-dev] 1.1 api suggestion

Ralph Giles giles at xiph.org
Mon Apr 19 10:38:35 PDT 2004



On Mon, Apr 19, 2004 at 02:46:44AM -0400, Jean-Marc Valin wrote:

> OK, I'll try to do *something* about it. It'll be either "support the
> 1.0 ABI" or "make sure the link will break". While the former would be
> nice, I'm not sure I want to really want to force 1.2 to have the same
> ABI as 1.0.x. More on this when I have some time to think about it.
> Suggestions are welcome.

I second this; changing the argument type to one of the main functions 
is a bad idea. It's true that the soname mechanism can take care of this 
on platforms that support it, but it's just confusing.

I'd suggest doing something like we did with vorbis (but in reverse): 
Add new speex_encode_int() and speex_decode_int() calls that that take 
the short* argument (or a typedef that's definitely 16 bits). Leave the 
plain speex_decode() and speex_encode() functions taking floats, and 
make them a simple wrapper that does the conversion and calls the _int 
version.

That way software written against 1.0.x still works, just with a 
performance penalty, and the path to upgrade is very clear.

If you want to have a completely different api for 1.2, that's fine, but 
there seem to be only minor changes. In that case it's nicer to maintain 
compatibility if at all possible.

IMO,
 -r
--- >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 'speex-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 Speex-dev mailing list