<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EstiloCorreo17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=ES link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span lang=EN-US>I’m new using OPUS and I’ve implemented the OPUS lib under PIC32MZ, using the MIPS configuration. It compiles correctly and it seems that all the procedures invoked returns no error. However, when I excite the encoder with a pure 1 kHz tone, the encoding/decoding procedure returns al the samples to silence (the buffer is filled with 0x8001 or 0x7fff). The configuration is 48000 sps, 64kHz bandwidth, two channels, OPUS_APPLICATION_AUDIO application. The lib version is 1.1.3. The initialization procedure is as follows:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US> _encoder = opus_encoder_create(48000, 2, OPUS_APPLICATION_AUDIO, &error);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> error = opus_encoder_ctl(_encoder, OPUS_SET_BITRATE(64000));<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> </span>_decoder = opus_decoder_create(48000, 2, &error);<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-US>The variable error is always set to OPUS_OK.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>The encoding and decoding procedure is as follows:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US> bytesEncoded = opus_encode(_encoder, _encoderBuffer, _frameSize, codedBuffer, sizeof(codedBuffer));<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> sampsDecoded = opus_decode(_decoder, codedBuffer, bytesEncoded, decoderBuffer, _frameSize, false);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>In this case, _frameSize is 960 (20 ms), bytesEncoded returns 0xa1 and sampsDecoded returns 960; codedBuffer is large enough to store the encoding data.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Everything seems to be correct, but the result is not. I’ve also tried with other configurations and the results are very similar. Any idea about what can be wrong in my implementation?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Thanks in advance for your help and kind regards,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>M. Heras<o:p></o:p></span></p></div></body></html>