In my experience most of the jitter related issues are because people are using too small of audio buffer sizes that match the framing size of Speex - particularly in Windows. This isn't a problem with Speex, but as a programmer you should collect and append a few frames to match the size of your output audio frame buffer before attempting to play the sound. -----Original Message----- From: owner-speex-dev@xiph.org [mailto:owner-speex-dev@xiph.org] On Behalf Of John Hayes Sent: Tuesday, May 20, 2003 11:12 AM To: speex-dev@xiph.org Subject: RE: [speex-dev] Speex settings and jitter The audio frame speex generates sounds pretty terrible most of the time, and I don't use it for jitter correction instead I just use it for dropped packets - so I usually drop the late packet. It sounds acceptable as long as I drop less than 5% of traffic (dropping 2 in a row makes a bad robot noise, so I reset the stream in that case). The good news is that on an unsaturated DSL line jitter and packet loss are basically 0.[1] In my experience dropping a packet without decoding NULL or without playing the gap packet make a really bad tick. John [1] The bad news is on a saturated DSL connection - it's basically unusable without a second of jitter buffering.> -----Original Message----- > From: owner-speex-dev@xiph.org [mailto:owner-speex-dev@xiph.org]On > Behalf Of Chris Flerackers > Sent: Tuesday, May 20, 2003 9:05 AM > To: speex-dev@xiph.org > Subject: [speex-dev] Speex settings and jitter > > > Hi, > > Is there are document where the interaction between all the configuration > options of speex is explained? > Speex seems to have CBR, VBR and ABR. You can also use SPEEX_SET_QUALITY > (SPEEX_SET_VBR_QUALITY) and SPEEX_SET_BITRATE which I suppose can't be set > at the same time. Is there a list of possible combinations somewhere? > > I also have another question related to jitter. To minimize jitter, you > usually need to make the audio > shorter and longer and preferably while keeping it sound smooth. > What is the > best way to do this > with speex? I saw that you can pass NULL to the decode function > to generate > an audio frame which > might be used to make the audio longer. Will speex always generate a > "fluent" audio stream (without ticks, ...) > when inserting these NULLs. And is dropping a packet a viable way to make > the audio shorter? > > Best regards, > Chris--- >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. <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.
Right - and I deal with that on the receiver end based on an approximation of sender's and receiver's responsiveness - the minimum latency I've been able to get into the system is about 150 ms. Of that, jitter buffering is about 40-100ms. I'd love to figure out how to get that down without killing myself on thread switching or Win32 kernel calls, but ms has to actually implement the DSBCAPS_CTRLPOSITIONNOTIFY capability in direct sound capture ... John> -----Original Message----- > From: owner-speex-dev@xiph.org [mailto:owner-speex-dev@xiph.org]On > Behalf Of Allen Drennan > Sent: Tuesday, May 20, 2003 11:18 AM > To: speex-dev@xiph.org > Subject: RE: [speex-dev] Speex settings and jitter > > > In my experience most of the jitter related issues are because people are > using too small of audio buffer sizes that match the framing size > of Speex - > particularly in Windows. This isn't a problem with Speex, but as a > programmer you should collect and append a few frames to match the size of > your output audio frame buffer before attempting to play the sound. > > -----Original Message----- > From: owner-speex-dev@xiph.org [mailto:owner-speex-dev@xiph.org] On Behalf > Of John Hayes > Sent: Tuesday, May 20, 2003 11:12 AM > To: speex-dev@xiph.org > Subject: RE: [speex-dev] Speex settings and jitter > > The audio frame speex generates sounds pretty terrible most of > the time, and > I don't use it for jitter correction instead I just use it for dropped > packets - so I usually drop the late packet. It sounds acceptable > as long as > I drop less than 5% of traffic (dropping 2 in a row makes a bad > robot noise, > so I reset the stream in that case). The good news is that on an > unsaturated > DSL line jitter and packet loss are basically 0.[1] > > In my experience dropping a packet without decoding NULL or > without playing > the gap packet make a really bad tick. > > John > > [1] The bad news is on a saturated DSL connection - it's > basically unusable > without a second of jitter buffering. > > > -----Original Message----- > > From: owner-speex-dev@xiph.org [mailto:owner-speex-dev@xiph.org]On > > Behalf Of Chris Flerackers > > Sent: Tuesday, May 20, 2003 9:05 AM > > To: speex-dev@xiph.org > > Subject: [speex-dev] Speex settings and jitter > > > > > > Hi, > > > > Is there are document where the interaction between all the > configuration > > options of speex is explained? > > Speex seems to have CBR, VBR and ABR. You can also use SPEEX_SET_QUALITY > > (SPEEX_SET_VBR_QUALITY) and SPEEX_SET_BITRATE which I suppose > can't be set > > at the same time. Is there a list of possible combinations somewhere? > > > > I also have another question related to jitter. To minimize jitter, you > > usually need to make the audio > > shorter and longer and preferably while keeping it sound smooth. > > What is the > > best way to do this > > with speex? I saw that you can pass NULL to the decode function > > to generate > > an audio frame which > > might be used to make the audio longer. Will speex always generate a > > "fluent" audio stream (without ticks, ...) > > when inserting these NULLs. And is dropping a packet a viable > way to make > > the audio shorter? > > > > Best regards, > > Chris > > --- >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. > > > --- >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. >--- >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.
In my experience most of the DirectSoundCapture interfaces actually just map over to standard Wave Multimedia recording so you are right in that DSBCAPS_CTRLPOSITIONNOTIFY is usually not implemented. The fastest way to record audio on Windows for the purposes of minimizing latency with something like Speex is to use a thread which uses GetMessage to extract buffers from the recording device. As you noted though, most of your latency is created when recording as Windows sound recording doesn't like really small buffers. -----Original Message----- From: owner-speex-dev@xiph.org [mailto:owner-speex-dev@xiph.org] On Behalf Of John Hayes Sent: Tuesday, May 20, 2003 11:33 AM To: speex-dev@xiph.org Subject: RE: [speex-dev] Speex settings and jitter Right - and I deal with that on the receiver end based on an approximation of sender's and receiver's responsiveness - the minimum latency I've been able to get into the system is about 150 ms. Of that, jitter buffering is about 40-100ms. I'd love to figure out how to get that down without killing myself on thread switching or Win32 kernel calls, but ms has to actually implement the DSBCAPS_CTRLPOSITIONNOTIFY capability in direct sound capture ... John> -----Original Message----- > From: owner-speex-dev@xiph.org [mailto:owner-speex-dev@xiph.org]On > Behalf Of Allen Drennan > Sent: Tuesday, May 20, 2003 11:18 AM > To: speex-dev@xiph.org > Subject: RE: [speex-dev] Speex settings and jitter > > > In my experience most of the jitter related issues are because people are > using too small of audio buffer sizes that match the framing size > of Speex - > particularly in Windows. This isn't a problem with Speex, but as a > programmer you should collect and append a few frames to match the size of > your output audio frame buffer before attempting to play the sound. > > -----Original Message----- > From: owner-speex-dev@xiph.org [mailto:owner-speex-dev@xiph.org] On Behalf > Of John Hayes > Sent: Tuesday, May 20, 2003 11:12 AM > To: speex-dev@xiph.org > Subject: RE: [speex-dev] Speex settings and jitter > > The audio frame speex generates sounds pretty terrible most of > the time, and > I don't use it for jitter correction instead I just use it for dropped > packets - so I usually drop the late packet. It sounds acceptable > as long as > I drop less than 5% of traffic (dropping 2 in a row makes a bad > robot noise, > so I reset the stream in that case). The good news is that on an > unsaturated > DSL line jitter and packet loss are basically 0.[1] > > In my experience dropping a packet without decoding NULL or > without playing > the gap packet make a really bad tick. > > John > > [1] The bad news is on a saturated DSL connection - it's > basically unusable > without a second of jitter buffering. > > > -----Original Message----- > > From: owner-speex-dev@xiph.org [mailto:owner-speex-dev@xiph.org]On > > Behalf Of Chris Flerackers > > Sent: Tuesday, May 20, 2003 9:05 AM > > To: speex-dev@xiph.org > > Subject: [speex-dev] Speex settings and jitter > > > > > > Hi, > > > > Is there are document where the interaction between all the > configuration > > options of speex is explained? > > Speex seems to have CBR, VBR and ABR. You can also use SPEEX_SET_QUALITY > > (SPEEX_SET_VBR_QUALITY) and SPEEX_SET_BITRATE which I suppose > can't be set > > at the same time. Is there a list of possible combinations somewhere? > > > > I also have another question related to jitter. To minimize jitter, you > > usually need to make the audio > > shorter and longer and preferably while keeping it sound smooth. > > What is the > > best way to do this > > with speex? I saw that you can pass NULL to the decode function > > to generate > > an audio frame which > > might be used to make the audio longer. Will speex always generate a > > "fluent" audio stream (without ticks, ...) > > when inserting these NULLs. And is dropping a packet a viable > way to make > > the audio shorter? > > > > Best regards, > > Chris > > --- >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. > > > --- >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. >--- >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. <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.
----- Original Message ----- From: "John Hayes" <jhayes@thereinc.com> To: <speex-dev@xiph.org> Sent: Tuesday, May 20, 2003 8:32 PM Subject: RE: [speex-dev] Speex settings and jitter <p>> Right - and I deal with that on the receiver end based on an approximation> of sender's and receiver's responsiveness - the minimum latency I've been > able to get into the system is about 150 ms. Of that, jitter buffering is > about 40-100ms. I'd love to figure out how to get that down withoutkilling> myself on thread switching or Win32 kernel calls, but ms has to actually > implement the DSBCAPS_CTRLPOSITIONNOTIFY capability in direct soundcapture Polling is the way with DirectSound. I have currently no problem with playing and capturing 20 ms frames on my SB Live. Keep the number of needed threads in your application as small as possible. Previous I got stuck in a scenario where I had simply too many threads doing simply too much to be able to get everything done in time. Currently, I am doing some experimental development involving Speex and I must take this opportunity to thank everyone involved with the projekt and of course especially Jean-Marc Valin. //Regards Jonas Tärnström, Sweden <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.