[opus] Trying to use Opus in an STM32F429IIT6 embedded project
Ulisses Piassa
ulisses.piassa at gmail.com
Wed Jun 7 11:42:04 UTC 2017
Hi everybody,
I tried the solutions proposed and some more things, but afterall, I still
could not figure out whats going wrong...
Some developers told me to try using the "opusfile" library, but it seems
really complicated to port to my project.
So I'm back to the mark zero.
Here's an screenshot of the files I ported to my project:
[image: Inline image 1]
[image: Inline image 2]
[image: Inline image 3]
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.
Absolutely ANY help would be useful. If anyone can give me any clue, I'll
be really thankful!
Thanks a lot!
Best Regards,
Ulisses
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.
On Mon, Jun 5, 2017 at 1:05 PM, Jean-Marc Valin <jmvalin at jmvalin.ca> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xiph.org/pipermail/opus/attachments/20170607/d4fae27c/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 31210 bytes
Desc: not available
URL: <http://lists.xiph.org/pipermail/opus/attachments/20170607/d4fae27c/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 33964 bytes
Desc: not available
URL: <http://lists.xiph.org/pipermail/opus/attachments/20170607/d4fae27c/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 32168 bytes
Desc: not available
URL: <http://lists.xiph.org/pipermail/opus/attachments/20170607/d4fae27c/attachment-0005.png>
More information about the opus
mailing list