[speex-dev] Speex latency
rolando.martins at ent.efacec.pt
Fri Mar 21 07:38:00 PST 2003
What sould be the capture and playback buffer size in 8,16,32 khz
for the Alsa system?
Can this also causing latency?
In the server side I have:
-A thread that reads the input from mic (capture) ands copies to
-The main loop encodes and sends it to the client ( it's read the
data from the main buffer)
-A thread for interacting with alsa, as soon as it has data on the
main buffer it's to the Alsa device
-The main loop reads from socket, decodes the frame and copies it to
the main buffer
As time goes by I start to notice an increase of latency.
<p><p> Rolando Martins
<p>> -----Original Message-----
> From: Jean-Marc Valin [SMTP:jean-marc.valin at hermes.usherb.ca]
> Sent: Sexta-feira, 21 de Março de 2003 15:08
> To: speex
> Cc: Rolando Martins
> Subject: Re: [speex-dev] Speex latency
> > What kind of latency is expected using 8,16,32 khz?
> Depending on the sampling rate, the latency is 30-36 ms (frame size is
> 20 ms).
> > I am trying to do a realtime stream server, and I am having latency
> > >500ms ( I capture the sound using the mic, encode it and send it to the
> > client).
> > I am using ALSA system, a SB128 PCI and a 800Mhz P3 . What can I do to
> > the latency?
> > I tried a test : arecord -t raw | speexenc - - | speexdec - and I found
> > I also have a 500 ms latency.
> There are likely 3 problems with your setup:
> 1) arecord might have a big latency (probably reads the audio big chunks
> at a time)
> 2) speexenc/speexdec has a larger latency than the codec itself (which
> you get using libspeex) because of the packets/pages in the Ogg file.
> 3) The pipes all do some buffering which probably causes additional
> Jean-Marc Valin, M.Sc.A.
> LABORIUS (http://www.gel.usherb.ca/laborius)
> Université de Sherbrooke, Québec, Canada
--- >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 at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Speex-dev