Hey, thanks for sharing this information. If this is true, it could explain some intermittent problems I've had, since I do encoding and decoding in separate threads. I assumed that Speex was thread-safe because there doesn't seem to be a connection between the encoder and decoder, and the encoder and decoder require separate states for different streams. I'm curious to know what interactions could occur between encoders and decoders running in separate threads. Can anyone else confirm or deny thread-safety issues with Speex? I'm going to put locks around all of my Speex code and see if my problem goes away... Thanks! Tom toffe <cc@svenstedt.se> wrote:> > Speex is running great now. But I had to lock thread when sending data > to the decoder to avoid random garbled sound. Apparently there where > some conflicts when calling encode and decode at the same time. Clearly > a lack of cofee case :). > > /Regards > _______________________________________________ > Speex-dev mailing list > Speex-dev@xiph.org > http://lists.xiph.org/mailman/listinfo/speex-dev
I have some other problems. My app is changing Speex settings at runtime. This works ok for 8 kHz mode. But when trying to do this at any other mode Speex goes wild and the sound is distorted. Is Speex designed to allow runtime changes? According to the manual one can use "In-band signalling" to change remote settings, so it should be... /Regards Tom Grandgent wrote:>Hey, thanks for sharing this information. If this is true, it could >explain some intermittent problems I've had, since I do encoding and > >
Le vendredi 22 juillet 2005 ? 03:16 -0400, Tom Grandgent a ?crit :> Hey, thanks for sharing this information. If this is true, it could > explain some intermittent problems I've had, since I do encoding and > decoding in separate threads. I assumed that Speex was thread-safe > because there doesn't seem to be a connection between the encoder and > decoder, and the encoder and decoder require separate states for > different streams. I'm curious to know what interactions could occur > between encoders and decoders running in separate threads. > > Can anyone else confirm or deny thread-safety issues with Speex?Speex *is* thread safe. As you noted, the encoder and decoder are not connected in any way and the only global data in Speex is constant (otherwise, it wouldn't even compile on Symbian). I suspect the previous poster had other non-thread-safe code (soundcard, some library, ...).> I'm going to put locks around all of my Speex code and see if my problem > goes away...Don't. Jean-Marc -- Jean-Marc Valin <Jean-Marc.Valin@USherbrooke.ca> Universit? de Sherbrooke
I have never had an issue with simultaneously encoding and decoding, if you keep separate encoder/decoder states for each encoder/decoder you use. Tom At 12:16 AM 7/22/2005, Tom Grandgent wrote:>Can anyone else confirm or deny thread-safety issues with Speex?______________________________________________ Tom Harper Lead Software Engineer SightSpeed - <http://www.sightspeed.com/>http://www.sightspeed.com/ 918 Parker St, Suite A14 Berkeley, CA 94710 Email: <mailto:laleguire@sightspeed.com>tharper<mailto:laleguire@sightspeed.com>@sightspeed.com Phone: 510-665-2920 Fax: 510-649-0660 My SightSpeed Video Link: <http://liam.sightspeed.com/>http://tom.sightspeed.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20050722/b0d3c7db/attachment.html