[opus] Trying to use Opus in an STM32F429IIT6 embedded project

Mirko Divac mirko.divac at ars-es.com
Tue Jun 6 10:07:47 UTC 2017


What about heap size? Do you have enough free space there?
I've had same problem on SAMS70N21, and I've solved it with freeing more 
space for dynamic allocation.

Best regards.
Mirko


On 5.6.2017 18:05, Jean-Marc Valin wrote:
> On 05/06/17 08:28 AM, Ulisses Piassa wrote:
>> I ported all the files from OpusLib 1.1.4 needed to compile the project,
>> but when I try to create and OpusDecode state, it returns the error -7
>> (OPUS_ALLOC_FAIL).
> Are you getting OPUS_ALLOC_FAIL on the opus_decoder_init() too or just
> on opus_decoder_create()?
>
>> I'm compiling it with the USE_ALLOCA flag. I also tried to compile it
>> with the flags OVERRIDE_OPUS_ALLOC OVERRIDE_OPUS_FREE
>> 'opus_alloc(x)=NULL' and 'opus_free(x)=NULL', but still having no success.
> when you use OVERRIDE_OPUS_ALLOC and opus_alloc(x)=NULL you're
> essentially saying "I don't have a working malloc()", so none of the
> calls to the *_create() functions can work, it's normal that you're
> seeing those fail with OPUS_ALLOC_FAIL because there's no way the
> library is able to allocate memory.
>
>> The code I wrote is:
>>
>>      int size;
>>      int error;
>>      OpusDecoder* dec;
>>      
>>      size = opus_decoder_get_size(1);
>>      dec = (OpusDecoder *) malloc(size);
>>      error = opus_decoder_init(dec, 8000, 1);
> This version should actually work and I don't see how
> opus_decoder_init() could return OPUS_ALLOC_FAIL since it's not
> allocating anything. Are you sure that's what it returns?
>
> 	Jean-Marc
> _______________________________________________
> opus mailing list
> opus at xiph.org
> http://lists.xiph.org/mailman/listinfo/opus

-- 

	
Mirko Divac
Research and Development Engineer, ARS Embedded Systems LLC
p: +381 62 471 534 a: Jovana Subotića 9, 21000, Novi Sad, Serbia
w: www.engineering.ars-es.com <http://www.engineering.ars-es.com> e: 
mirko.divac at ars-es.com <mailto:mirko.divac at ars-es.com>




---
Ovaj email je proveren na maliciozne programe od strane Avast antivirus softvera.
https://www.avast.com/antivirus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xiph.org/pipermail/opus/attachments/20170606/fb8df409/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logo_ARS.jpg
Type: image/jpeg
Size: 9788 bytes
Desc: not available
URL: <http://lists.xiph.org/pipermail/opus/attachments/20170606/fb8df409/attachment.jpg>


More information about the opus mailing list