|
|
Choosing A Webhost: |
RE: How does the jitter buffer "catch up"?: msg#00054audio.compression.speex.devel
(PS, if you do use threads, protect speex_jitter_put/get with a mutex Err, unless I'm totally wrong, there are a few race conditions. Assume the buffer is full of packets newer than the current pointer, and one that is at the current pointer. get and put start at the same time. get will find the correct buffer index. Now, just after it finds it's index, assume we switch to the put thread. Put needs to put a new packet in, so discards the oldest, which is the current packet, and replaces it with the new one (let's call it newest). get now starts decoding, but the index it found now points to the newest packet, which it will decode and remove from the buffer. Granted, it's not terribly likely to happen, and the jitter-buffer as a whole has no crashbugs regarding two-thread access, but it will sound a bit odd if this should ever happen :) As for detecting outages, a hack I use is to check jitter->valid_bits. If Actually, I oversimplified a bit. I check if valid_bits has been zero for the last 4 frames or more, because once you interpolate more than 100ms from the last known state, you end up with some weird blipp-blopp-blooiiing sound. Actually it reminds me of the ambient sound of weird aliens in bad 50s scifi movies. At that point, silence is much better :)
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: How does the jitter buffer "catch up"?, Jean-Marc Valin |
|---|---|
| Next by Date: | RE: How does the jitter buffer "catch up"?, Jean-Marc Valin |
| Previous by Thread: | RE: How does the jitter buffer "catch up"?, Jean-Marc Valin |
| Next by Thread: | RE: How does the jitter buffer "catch up"?, Jean-Marc Valin |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |