Displaying 3 results from an estimated 3 matches for "opus_decoder_get_size".
2017 Jun 05
3
Trying to use Opus in an STM32F429IIT6 embedded project
...;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.
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);
I also tried this code:
int error;
OpusDecoder *dec;
dec = opus_decoder_create(8000, 1, &error);
In this particular case, I got an error and the firmware crashes.
Once I'm totally new to...
2012 Aug 31
1
Memory Size?
...for my embedded
C55xx design, I have used the following to get the encoder and decoder
memory requirements:
size = opus_encoder_get_size(config.channels);
enc = malloc(size);
error = opus_encoder_init(enc, config.Fs, config.channels,
config.application);
size = opus_decoder_get_size(config.channels);
dec = malloc(size);
error = opus_decoder_init(dec, config.Fs, config.channels);
Both the encode decoder init function return no error. However, opus_encode
crashes somewhere deep in the bowels of the function (I cannot determine
where since I have compiler opti...
2017 Jun 05
0
Trying to use Opus in an STM32F429IIT6 embedded project
...o 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