Hi. After changing my code to construct a JitterBufferPacket and passing that to speex_jitter_put, my program works with the new jitter buffer using the wrapper functions (speex_jitter_* instead of the new jitter_buffer_*). However, a lot of warning: did you forget to call jitter_buffer_tick() by any chance? is displayed. Looking at speex_jitter_get, the logic seems to be as follows: if there is another frame in the previously fetched packet, decode it and call jitter_buffer_tick else get a new packet and decode first frame. But when a new packet is fetched, jitter_buffer_tick isn't called, so if I only have one frame per packet, it will never be called. Is this a bug in speex_jitter_get, or am I doing something wrong?
Le mardi 02 mai 2006 ? 18:15 +0200, Thorvald Natvig a ?crit :> Hi. > > After changing my code to construct a JitterBufferPacket and passing that > to speex_jitter_put, my program works with the new jitter buffer using the > wrapper functions (speex_jitter_* instead of the new jitter_buffer_*).Oops, I forgot to make sure I keep the API stable for the old buffer. Any thoughts on the change (revert or continue as is)?> However, a lot of > warning: did you forget to call jitter_buffer_tick() by any chance? > is displayed. > > Looking at speex_jitter_get, the logic seems to be as follows: > > if there is another frame in the previously fetched packet, decode it and > call jitter_buffer_tick > > else get a new packet and decode first frame. > > But when a new packet is fetched, jitter_buffer_tick isn't called, so if I > only have one frame per packet, it will never be called. > > Is this a bug in speex_jitter_get, or am I doing something wrong?This is definitely a bug in speex_jitter_get() because it hasn't been updated for changes in the "generic" jitter buffer. I'll fix that. Jean-Marc
>> After changing my code to construct a JitterBufferPacket and passing that >> to speex_jitter_put, my program works with the new jitter buffer using the >> wrapper functions (speex_jitter_* instead of the new jitter_buffer_*). > > Oops, I forgot to make sure I keep the API stable for the old buffer. > Any thoughts on the change (revert or continue as is)?Well, I presume the idea of keeping speex_jitter_* around is to enable old programs to compile "out of the box" with newer versions of speex without modifications. I think it would be better to change it so the API is same. I must say I really like the generalized jitter buffer though :) It's a cleaner and more flexible implementation and can more easily be adjusted to contain additional information with each packet.>> But when a new packet is fetched, jitter_buffer_tick isn't called, so if I >> only have one frame per packet, it will never be called. >> >> Is this a bug in speex_jitter_get, or am I doing something wrong? > > This is definitely a bug in speex_jitter_get() because it hasn't been > updated for changes in the "generic" jitter buffer. I'll fix that.Thanks :)