Jean-Marc Valin
2004-Aug-06 15:02 UTC
[speex-dev] Re: does installed lib support _int()s ?
Hi, Right now, I'm thinking of adding a speex_lib_ctl() call that would support SPEEX_GET_VERSION (and return a string) or SPEEX_GET_MAJOR_VERSION and SPEEX_GET_MINOR_VERSION (and return ints). I'm open to other suggestions though. If there's anything you'd like to see in the API for 1.2, say it now. ...and no, I won't add a speex_do_all_the_work_for_me() call :) Jean-Marc Le dim 16/05/2004 à 16:42, Malcolm Baldridge a écrit :> > How? VERSION isn't included anywhere except in speex_init_header(), > > and I do not see any other symbols that encode the version.... > > Hrm, I take it then that speex_encode_int() exists in both 1.0 and 1.1, > then? I'd assumed that speex_encode_int() only existed in one of them. > Otherwise I've just put my foot in my mouth. :) > > Are you merely looking for the fastest turn-around time given a supply of > short integer sample data being presented to the library? Or are you just > looking for a one-api-entry-fits-all-versions from a functional perspective? > > =MB> > --- >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@xiph.org' > containing only the word 'unsubscribe' in the body. No subject is needed. > Unsubscribe messages sent to the list will be ignored/filtered.-- Jean-Marc Valin http://www.xiph.org/~jm/ LABORIUS 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/20040516/726e184f/signature-0001.pgp
Il lun, 2004-05-17 alle 03:08, Malcolm Baldridge ha scritto:> > Right now, I'm thinking of adding a speex_lib_ctl() call that would > > support SPEEX_GET_VERSION (and return a string) or > > SPEEX_GET_MAJOR_VERSION and SPEEX_GET_MINOR_VERSION (and return ints). > > I'm open to other suggestions though. If there's anything you'd like to > > see in the API for 1.2, say it now. ...and no, I won't add a > > speex_do_all_the_work_for_me() call :) > > May I respectfully suggest something a bit more organised and less chaotic > such as: > > 1) A *RUNTIME* call into the library which returns an unsigned long (32-bit) > value split up as follows: > > 0x00010101 > ^^ release level [alpha, beta, gamma, release, post-release patch#] > ^^ minor version > ^^^^ major versionPersonally I'm against that. I see it would be somewhat nicer to have the call just as proposed. This is also a personal opinion but I don't like the "GET' sub-token. By the way, since the call is to be added, what could be the proposed prototype? Does the name came from "sysctl" from linux? What are the other possible arguments that could poke in? <p>> 2) A *RUNTIME* call into the library which returns the text-version string> of the library in use. > > speex_lib_version_string() perhaps?I think it would be nice (though not necessarly needed), expecially if the returned string is easy to parse (so one could just ask for that and parse the results out). I must say this is a personal opinion based on my previous coding experiences but this is for what mailing lists are for I guess. Thank you Massimo <p>--- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
On Sun, May 16, 2004 at 06:03:47PM -0400, Jean-Marc Valin wrote:> Right now, I'm thinking of adding a speex_lib_ctl() call that would > support SPEEX_GET_VERSION (and return a string) or > SPEEX_GET_MAJOR_VERSION and SPEEX_GET_MINOR_VERSION (and return ints). > I'm open to other suggestions though. If there's anything you'd like to > see in the API for 1.2, say it now. ...and no, I won't add a > speex_do_all_the_work_for_me() call :)Sounds reasonable. You could also overload the existing speex_*_ctl() calls to take SPEEX_GET_LIB_VERSION, SPEEX_GET_LIB_MAJOR_VERSION, etc. What people are really asking for here is a way to determine at for conditional compilation (i.e. at configure time) what calls are available. One traditional way to do that is just to provide #defines for SPEEX_MAJOR_VERSION and so on in the header. If you're using autoconf you can of course try to link with one of the new functions, but just saying: #include <speex.h> #if defined(SPEEX_MINOR_VERSION) && (SPEEX_MINOR_VERSION > 0) /* code that uses speex_decode_int(); */ #else /* code that uses speex_decode(); */ #endif is more portable. So it might be worth doing that as well. FWIW, -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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Malcolm Baldridge
2004-Aug-06 15:02 UTC
[speex-dev] Re: does installed lib support _int()s ?
> Sounds reasonable. You could also overload the existing speex_*_ctl() > calls to take SPEEX_GET_LIB_VERSION, SPEEX_GET_LIB_MAJOR_VERSION, etc. > > What people are really asking for here is a way to determine at for > conditional compilation (i.e. at configure time) what calls are > available.Runtime methods would be nice too, for prebuilts to be able to determine what they can call and whatnot. =MB--- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Malcolm Baldridge
2004-Aug-06 15:02 UTC
[speex-dev] Re: does installed lib support _int()s ?
> Right now, I'm thinking of adding a speex_lib_ctl() call that would > support SPEEX_GET_VERSION (and return a string) or > SPEEX_GET_MAJOR_VERSION and SPEEX_GET_MINOR_VERSION (and return ints). > I'm open to other suggestions though. If there's anything you'd like to > see in the API for 1.2, say it now. ...and no, I won't add a > speex_do_all_the_work_for_me() call :)May I respectfully suggest something a bit more organised and less chaotic such as: 1) A *RUNTIME* call into the library which returns an unsigned long (32-bit) value split up as follows: 0x00010101 ^^ release level [alpha, beta, gamma, release, post-release patch#] ^^ minor version ^^^^ major version You can partition the release level as follows: 00-2F = pre-alpha 30-4F = alpha 50-6F = beta 70-7F = gamma 80-FF = release 1.1b17 would be: 0x00010161 2.2.35 would be: 0x000202A3 Then you can define compile-time MACROS for #define SPEEX_GET_FULL_VERSION (speex_lib_version()) #define SPEEX_GET_MAJOR_MINOR_VERSION (speex_lib_version() >> 24) #define SPEEX_GET_MAJOR_VERSION (speex_lib_version() >> 16) #define SPEEX_GET_RELEASE_LEVEL (speex_lib_version() & 0xFFUL) #define SPEEX_GET_FULL_MINOR_VERSION (speex_lib_version() & 0xffffUL) #define SPEEX_GET_MINOR_VERSION ((speex_lib_version() >> 8) & 0xFFUL) 2) A *RUNTIME* call into the library which returns the text-version string of the library in use. peex_lib_version_string() perhaps? =MB--- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.