<div dir="ltr"><span style="font-size:12.8px">Hi everybody,</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I tried the solutions proposed and some more things, but afterall, I still could not figure out whats going wrong...</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Some developers told me to try using the "opusfile" library, but it seems really complicated to port to my project.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">So I'm back to the mark zero.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Here's an screenshot of the files I ported to my project:</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><img src="cid:ii_15c7ec4bdc4b26cc" alt="Inline image 1" width="269" height="562" class="gmail-CToWUd gmail-a6T" tabindex="0"><br></div><div style="font-size:12.8px"><img src="cid:ii_15c7ec53595d5655" alt="Inline image 2" width="274" height="562" class="gmail-CToWUd gmail-a6T" tabindex="0"><br></div><div style="font-size:12.8px"><img src="cid:ii_15c7ec5a4258cd61" alt="Inline image 3" width="289" height="562" class="gmail-CToWUd gmail-a6T" tabindex="0"><br></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">When I say "port", I mean "I put all the files that the compiler looked for and generated an error for not finding them". If I want to use the "decode" function, I put all the files which this function depends on.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Absolutely ANY help would be useful. If anyone can give me any clue, I'll be really thankful!</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Thanks a lot!</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Best Regards,<br></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Ulisses</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">P.S.: I'm sorry Jean-Marc, I'd just realized that I replied for you only, and not for the opus list. My apologies.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 5, 2017 at 1:05 PM, Jean-Marc Valin <span dir="ltr"><<a href="mailto:jmvalin@jmvalin.ca" target="_blank">jmvalin@jmvalin.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 05/06/17 08:28 AM, Ulisses Piassa wrote:<br>
> I ported all the files from OpusLib 1.1.4 needed to compile the project,<br>
> but when I try to create and OpusDecode state, it returns the error -7<br>
> (OPUS_ALLOC_FAIL).<br>
<br>
</span>Are you getting OPUS_ALLOC_FAIL on the opus_decoder_init() too or just<br>
on opus_decoder_create()?<br>
<span class=""><br>
> I'm compiling it with the USE_ALLOCA flag. I also tried to compile it<br>
> with the flags OVERRIDE_OPUS_ALLOC OVERRIDE_OPUS_FREE<br>
> 'opus_alloc(x)=NULL' and 'opus_free(x)=NULL', but still having no success.<br>
<br>
</span>when you use OVERRIDE_OPUS_ALLOC and opus_alloc(x)=NULL you're<br>
essentially saying "I don't have a working malloc()", so none of the<br>
calls to the *_create() functions can work, it's normal that you're<br>
seeing those fail with OPUS_ALLOC_FAIL because there's no way the<br>
library is able to allocate memory.<br>
<span class=""><br>
> The code I wrote is:<br>
><br>
> int size;<br>
> int error;<br>
> OpusDecoder* dec;<br>
><br>
> size = opus_decoder_get_size(1);<br>
> dec = (OpusDecoder *) malloc(size);<br>
> error = opus_decoder_init(dec, 8000, 1);<br>
<br>
</span>This version should actually work and I don't see how<br>
opus_decoder_init() could return OPUS_ALLOC_FAIL since it's not<br>
allocating anything. Are you sure that's what it returns?<br>
<span class="HOEnZb"><font color="#888888"><br>
Jean-Marc<br>
</font></span></blockquote></div><br></div>