[speex-dev] 1.1 api suggestion

Jean-Marc Valin Jean-Marc.Valin at USherbrooke.ca
Sun Apr 18 23:46:44 PDT 2004

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.


Le lun 19/04/2004 à 02:18, Conrad Parker a écrit :
> Hi Jean-Marc, randoms,
> I've been playing with the 1.1.x api, more specifically modifying code to
> conditionally build against the 1.0.x api or the 1.1.x api.
> Code written for 1.0.x builds, with a few warnings, against 1.1.x.
> The major API change is of course that the type of PCM buffers has changed
> from float to int. This causes a few warnings related to speex_encode()
> and speex_decode() etc., but otherwise, existing code continues to build.
> The problem is of course that application binaries built against speex 1.0.x
> will load against speex 1.1.x. The encode and decode functions have the same
> number and size arguments, so everything will load and execute just the same
> at runtime. An application will run, libspeex will try to do stuff, but the
> two will disagree about the types and sizes of the buffers. The expected
> behaviour might be a 1/4 second of random noise, followed by a segfault :)
> Of course, a user will find this out when they upgrade (say) kphone, and
> suddenly xine starts crashing, for example.
> So, the obvious suggestion is to have different function names for the
> functions that take shorts instead of floats.
> It's then also possible to maintain backwards compatability, by providing
> wrapper functions with the same prototype as the functions in 1.0.x. (rillian
> mentioned this was done for a similar change in libvorbis).
> These functions could simply return an error when building for an
> integer-only version of the library.
> cheers,
> Conrad.

Jean-Marc Valin
Université de Sherbrooke, Québec, Canada

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: Ceci est une partie de message numériquement signée.
Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20040419/cd75b617/signature.pgp

More information about the Speex-dev mailing list