<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2995" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>It's working, and it's marginally intelligible, but 
not usable, so I thought I'd post a message to make sure I'm still 
sane.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>I have the app capturing from the mic at 16kHz. I'm 
using 3200 byte buffers to read the captured data, which is 100 ms of 16 bit 
sample data at 16kHz. (1600 samples)</FONT></DIV>When&nbsp;I pass this data 
unaltered to the playback stream it plays fine with maybe&nbsp;200&nbsp;ms lag, 
which is correct.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Encoding: Quality 6, VBR<BR></FONT><FONT face=Arial 
size=2><BR>mResult = speex_encoder_ctl( mEncodeState, SPEEX_GET_FRAME_SIZE, 
&amp; mFrameSize);</DIV></FONT>
<DIV><FONT face=Arial size=2><BR>The encoder returns a frame size of 320. Sanity 
check 1. This means 320 sample frames of 16 bit samples, or 620 bytes of data 
right?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>So encoding my 100 ms, 3200 byte buffer of mic 
captured samples compresses 5 frames of source at 640 bytes (320 samples) 
each.</FONT></DIV>
<DIV><FONT face=Arial size=2>You were correct in that each frame of talking data 
compresses to around 70 bytes or less, which is roughly 10:1 compression ratio, 
which is around 320 bytes of compressed data per 100ms (3200 bytes) of capture 
data.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I then immediately decode the 5 encoded packets to 
a 3200 byte buffer.</FONT></DIV>
<DIV><FONT face=Arial size=2>Then I play the sound in the output 
stream.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>The sound is quite awful, and mostly unintelligible 
at best, but I can definately tell that what's being compressed/decompressed 
'feels' similar to what I'm saying into the mic, and on a rare occasion, it 
actually is marginally intelligible.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I have checked all of the return values for errors, 
there are none.</FONT></DIV>
<DIV><FONT face=Arial size=2>I have also tried non-VBR, and different quality 
settings including 10 but with no real difference.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV>
<DIV><FONT face=Arial size=2>I'm asuming that I'm mistaken about one or more of 
these figures and that's where the problem lies. Please send the men in white 
coats.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV></DIV>
<DIV><FONT face=Arial size=2>Kirk</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV></BODY></HTML>