<DIV>Hi Ian,</DIV>  <DIV>&nbsp;</DIV>  <DIV>Thanks for the suggestions you have given. Yes I found the issue with the encoder_example.c. The required change is in red color below.</DIV>  <DIV><BR>for(i=0;i&lt;bytes/4;i++){<BR>&nbsp;buffer[0][i]=((<FONT style="BACKGROUND-COLOR: #ff007f">(char)</FONT>readbuffer[i*4+1]&lt;&lt;8)|<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (0x00ff&amp;(int)readbuffer[i*4]))/32768.f;<BR>&nbsp;buffer[1][i]=((<FONT style="BACKGROUND-COLOR: #ff0000">(char)</FONT>readbuffer[i*4+3]&lt;&lt;8)|<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (0x00ff&amp;(int)readbuffer[i*4+2]))/32768.f;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</DIV>  <DIV>the problem is that readbuffer is taken as unsignedchar and bitshifting had gone wrong. The above change solves the problem. I&nbsp;am using CodeWarrior editor on windows platform. I am not quite sure if this&nbsp;issue exists&nbsp;on other platforms. That is the case, it is good to change the example.</DIV>  <DIV>&nbsp;</DIV> 
 <DIV>thanks.</DIV>  <DIV>Pavan.</DIV>  <DIV><BR><B><I>Ian Malone &lt;ibm21@cam.ac.uk&gt;</I></B> wrote:</DIV>  <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">pavan kumar wrote:<BR>&gt; Hi,<BR>&gt; Thanks for the info. I have checked for alternative endian also. The <BR>&gt; result is same. I am pasting the code i have written. It differs from <BR>&gt; the example code only when we read/write the data from/to the file. <BR>&gt; Symbian file read - write APIs support only descriptors.<BR>&gt; It would be helpful if you can point out whether i am missing somewhere <BR>&gt; in the below code. This code generates the ogg with more of noise but <BR>&gt; some music somewhere in the background. Same file goldwav converts <BR>&gt; properly into an oggfile. does any one have a working example code, I <BR>&gt; would be grateful if you can send me as soon as possible.<BR>&gt; <BR><BR><SNIP><BR><BR>I haven't cmped them, but your code looks
 the same as the encoder to<BR>me, except I have no experience with the symbian platform, so I'll<BR>have to take your word for it that the IO is equivalent to what's in<BR>the example. For the same reason I don't have any code that will<BR>work on it.<BR><BR>The only other thing I can suggest (given that you can hear some music)<BR>is corruption of the wav on the way in. Does the Symbian read API have<BR>a text mode that might be responsible? Does converting the output of<BR>the following portion back into integer format (and putting the header<BR>back on) rather than encoding it give something close to the original<BR>wav? Is it possible the test file is unsigned int?<BR><BR>&gt; <BR>&gt; /* uninterleave samples */<BR>&gt; for(i=0;i<BYTES 4;i++){<br>&gt; buffer[0][i]=((readBuffer[i*4+1]&lt;&lt;8)|<BR>&gt; (0x00ff&amp;(int)readBuffer[i*4]))/32768.f;<BR>&gt; buffer[1][i]=((readBuffer[i*4+3]&lt;&lt;8)|<BR>&gt; (0x00ff&amp;(int)readBuffer[i*4+2]))/32768.f;<BR>&gt; }<BR><BR>&gt;
 <BR><BR>Sorry, that's about all I can do.<BR>-- <BR>imalone<BR>_______________________________________________<BR>Vorbis mailing list<BR>Vorbis@xiph.org<BR>http://lists.xiph.org/mailman/listinfo/vorbis<BR></BLOCKQUOTE>  <DIV><BR></DIV><p>Send instant messages to your online friends http://in.messenger.yahoo.com