[Speex-dev] tgAudioCodec.zip

Tom Grandgent tgrand at canvaslink.com
Mon Apr 4 19:02:52 PDT 2005


Jean-Marc Valin <Jean-Marc.Valin at USherbrooke.ca> wrote:
> 
> > 1) Supporting the various versions of Speex is a nuisance, mainly 
> > because there is no #define or API call to query the version.
> 
> It is possible to get the version using speex_lib_ctl(int request, void
> *ptr). Possible requests are SPEEX_LIB_GET_MAJOR_VERSION,
> SPEEX_LIB_GET_MINOR_VERSION, SPEEX_LIB_GET_MICRO_VERSION,
> SPEEX_LIB_GET_EXTRA_VERSION, and SPEEX_LIB_GET_VERSION_STRING. Also,
> what do you mean by version problems? The API hasn't changed at all for
> the 1.0 branch. For 1.1.x, I'm added a few interfaces, but modified
> 1.0.x to stay compatible (while not breaking 1.0 compatibility).

Glad to hear there is a way now.  The problem I ran into predated that 
feature though.  At some point, speex_preprocess got changed from 
taking floats to ints.  Not a big deal for me, and I know it's part of 
the unstable series, but it was a breaking change that I never knew 
about until someone got compile errors with my class.

I had tried to upgrade to a newer version of Speex myself, but I kept 
getting weird problems where the decoder would flip out after awhile 
(seemingly at random, and almost never on my PC), producing very loud 
noise, and I'd have to restart the stream.  After some unsuccessful 
debugging attempts I went back to the older version that has been very 
solid for me.  I'm pretty sure the problem is on my end but I haven't 
figured it out yet...

I thought it might be related to packing multiple frames together.  Can 
you tell me if it's still ok to do speex_bits_init, call speex_encode 
several times, then speex_bits_insert_terminator, then speex_bits_write + 
speex_bits_destroy.  And then on the decoding side do speex_bits_init, 
speex_bits_read_from, and loop on speex_decode until either it returns -1 
or speex_bits_remaining returns <= 0?

> If you still intend to work on your wrapper, it would be nice to keep it
> available for people who behave ;-) Perhaps removing your email address
> or something. 

Hmm, you and Ralph have convinced me to put it back online.  But I'll 
have to review the code and strip out the application-specific stuff 
I've added since then.  I suppose if I put a little more thought into 
the instructions I include with it, things would probably be ok.  I 
think I overreacted before anyway...

Thanks,

Tom


More information about the Speex-dev mailing list