No subject


Mon Mar 24 17:02:25 PDT 2008


   1. You pass in half the samples as the 'bits' arg.  Speex looks at 1
   frame worth of those bits and decodes them, decoded result in 'pcm'.
   2. You pass in exactly 1 frame of data as the 'bits' arg.  Speex looks at
   1 frame worth of those bits (which is all there, exactly), decodes them,
   stores decoded result in 'pcm'.
   3. You pass in 2 frames of data as the 'bits' arg.  Speex looks at 1
   frame worth of those bits (which, again, is all there), decodes them, stores
   decoded result in 'pcm'.

When there is no more data to decode, then speex will return -1.  I'm also
thinking that you'd need to somehow change what 'bits' points to (advancing
the pointer to the next frame)... Or then again, I could be entirely wrong
here -- I haven't actually written any speex_decode_int code myself (though
I have maintained it, and the speex linkages for the project I've worked
on).

-- 
Keith Kyzivat

SIPez LLC.
SIP VoIP, IM and Presence Consulting
http://www.SIPez.com
tel: +1 (617) 273-4000

------=_Part_113560_5269089.1223565455592
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

<div dir="ltr"><div class="gmail_quote"><span class="Apple-style-span" style="font-weight: bold;">Caveat</span>: Take what I&#39;m saying with a grain of salt -- I haven&#39;t actually written any code that decodes speex frames myself, though I have written code using Jean-Marc&#39;s Speexdsp lib.</div>
<div class="gmail_quote"><br></div><div class="gmail_quote">Comments below inline</div><div class="gmail_quote"><br></div><div class="gmail_quote">On Thu, Oct 9, 2008 at 9:28 AM, Darren Longhorn <span dir="ltr">&lt;<a href="mailto:darren.longhorn at redembedded.com">darren.longhorn at redembedded.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="Ih2E3d">I think I still didn&#39;t fully understand. As a test I encoded some frames<br></div>
(wideband, with quality set to 8), each were 70 bytes. I then did three<br>
things:<br>
<br>
&nbsp;- passed half of it to the decoder<br>
&nbsp;- passed exactly one frame to the decoder<br>
&nbsp;- I passed two concatenated frames to the decoder.<br>
<br>
In all cases speex_decode_int returned 0.<br>
<br>
Unless I misunderstood what you say above, I think it should have<br>
returned 0 only for the third test, -1 for the second test and perhaps<br>
-2 for the first test?</blockquote><div><br></div><div>From what I can tell, here is what happens, and why (I think) you&#39;re receiving 0 for all three tests:</div><div><ol><li>You pass in half the samples as the &#39;bits&#39; arg. &nbsp;Speex looks at 1 frame worth of those bits and decodes them,&nbsp;decoded result&nbsp;in &#39;pcm&#39;.</li>
<li>You pass in exactly 1 frame of data as the &#39;bits&#39; arg. &nbsp;Speex looks at 1 frame worth of those bits (which is all there, exactly), decodes them, stores&nbsp;decoded result&nbsp;in &#39;pcm&#39;.</li><li>You pass in 2 frames of data as the &#39;bits&#39; arg. &nbsp;Speex looks at 1 frame worth of those bits (which, again, is all there), decodes them, stores decoded result in &#39;pcm&#39;.</li>
</ol><div>When there is no more data to decode, then speex will return -1. &nbsp;I&#39;m also thinking that you&#39;d need to somehow change what &#39;bits&#39; points to (advancing the pointer to the next frame)... Or then again, I could be entirely wrong here -- I haven&#39;t actually written any speex_decode_int code myself (though I have maintained it, and the speex linkages for the project I&#39;ve worked on).&nbsp;</div>
</div></div><br>-- <br>Keith Kyzivat<br><br>SIPez LLC.<br>SIP VoIP, IM and Presence Consulting<br><a href="http://www.SIPez.com">http://www.SIPez.com</a><br>tel: +1 (617) 273-4000<br>
</div>

------=_Part_113560_5269089.1223565455592--


More information about the Speex-dev mailing list