<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. =><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 <jean-marc.valin@usherbrooke.ca><br>To: Carine Liang <carineliang@yahoo.com.sg><br>Cc: John Miles <jmiles@pop.net>; 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> Jean-Marc<br><br>Carine Liang a écrit :<br>> Hi,<br>> <br>> <br>> <br>> I'm still unable to get rid of the background noise though I've<br>> changed the PCM samples to 16 bit. I'm began to wonder if I can just<br>> take the PCM samples and encode them.<br>> <br>> What my application tries to do is to record the voice from a<br>> microphone, encode it, send it via the socket to a peer, decode at<br>> the peer's side and play the voice. My application works fine without<br>> the codec but I need to achieve a lower data rate. Anyone has done<br>> that before?<br>> <br>> Is there anyone who's deal with encoding and decoding PCM samples in<br>> windows?<br>> <br>> Please help.<br>> <br>> Carine<br>> <br>> ----- Original Message ---- From: John Miles
<jmiles@pop.net> To:<br>> Carine Liang <carineliang@yahoo.com.sg>; speex-dev@xiph.org Sent:<br>> Friday, 3 November 2006 12:32:43 AM Subject: RE: [Speex-dev]<br>> Integrating speex with VideoNet application: Constantbackground noise<br>> <br>> <br>> <br>> <br>> <br>> DIV { MARGIN:0px;}<br>> <br>> <br>> <br>> Yes, it's necessary; Speex will encode signed 16-bit PCM data and<br>> decode to the same format. See the examples that come with it.<br>> <br>> <br>> <br>> 8-bit audio is not something you would ever want to use.<br>> <br>> <br>> <br>> <br>> <br>> ------------------------------------------------------------------------<br>> <br>> <br>> _______________________________________________ Speex-dev mailing<br>> list Speex-dev@xiph.org <br>> <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>