<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">Hi Jean-Marc,<br><br>Thanks. I've got the code for sampleenc and sampledec. But I didn't know how to verify whether the decoded file is correct.<br>So I tried to analyse the decoded output and compile with my input.<br><br>Test case: PCM samples, 8 bit, 8000 samples per sec. <br>When I pulled all my input to 0s, after encode and decode, the output fluctuates around -0.12 to 0.2 (in float), so when finally cast to character, they are still 0. Hence I've hear no background sound at all. =&gt;<br><br>When I set all my input values to 127 (max +ve value) and -128 (max -ve value), I heard a soft background noise. But still acceptable. <br><br>When I use my actual input, the pounding background noise came back.<br>1. My input fluctuates
 around -128 and 127. <br>2. The decoded output is highly random. Initially it has values close to 0, then slowly the value danced around in a wide range of -163 to 201.<br><br>When I commented out the encode and decode, I am able to hear the recorded sound without no background noise. <br><br>Is my decoded output expected? Since I'm dealing with a 8 bit sample, am I right to say that I will not have the "big/little endian" issue?<br><br>What has gone wrong???<br><br><br>Regards,<br>Carine<br><br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Jean-Marc Valin &lt;jean-marc.valin@usherbrooke.ca&gt;<br>To: Carine Liang &lt;carineliang@yahoo.com.sg&gt;<br>Cc: John Miles &lt;jmiles@pop.net&gt;; speex-dev@xiph.org<br>Sent: Monday, 25 December 2006 10:22:44 AM<br>Subject: Re: [Speex-dev] Integrating speex with VideoNet application: Constantbackground noise<br><br><div>Have you tried starting with
 sampleenc/sampledec instead of doing<br>everything from scratch. That and the manual should contain everything<br>that's needed.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;Jean-Marc<br><br>Carine Liang a écrit :<br>&gt; Hi,<br>&gt; <br>&gt; <br>&gt; <br>&gt; I'm still unable to get rid of the background noise though I've<br>&gt; changed the PCM samples to 16 bit. I'm began to wonder if I can just<br>&gt; take the PCM samples and encode them.<br>&gt; <br>&gt; What my application tries to do is to record the voice from a<br>&gt; microphone, encode it, send it via the socket to a peer, decode at<br>&gt; the peer's side and play the voice. My application works fine without<br>&gt; the codec but I need to achieve a lower data rate. Anyone has done<br>&gt; that before?<br>&gt; <br>&gt; Is there anyone who's deal with encoding and decoding PCM samples in<br>&gt; windows?<br>&gt; <br>&gt; Please help.<br>&gt; <br>&gt; Carine<br>&gt; <br>&gt; ----- Original Message ---- From: John Miles
 &lt;jmiles@pop.net&gt; To:<br>&gt; Carine Liang &lt;carineliang@yahoo.com.sg&gt;; speex-dev@xiph.org Sent:<br>&gt; Friday, 3 November 2006 12:32:43 AM Subject: RE: [Speex-dev]<br>&gt; Integrating speex with VideoNet application: Constantbackground noise<br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; DIV { MARGIN:0px;}<br>&gt; <br>&gt; <br>&gt; <br>&gt; Yes, it's necessary; Speex will encode signed 16-bit PCM data and<br>&gt; decode to the same format.&nbsp;&nbsp;See the examples that come with it.<br>&gt; <br>&gt; <br>&gt; <br>&gt; 8-bit audio is not something you would ever want to use.<br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; ------------------------------------------------------------------------<br>&gt; <br>&gt; <br>&gt; _______________________________________________ Speex-dev mailing<br>&gt; list Speex-dev@xiph.org <br>&gt; <a target="_blank"
 href="http://lists.xiph.org/mailman/listinfo/speex-dev">http://lists.xiph.org/mailman/listinfo/speex-dev</a><br></div></div><br></div></div><br>Send instant messages to your online friends http://asia.messenger.yahoo.com </body></html>