use opus_(re)alloc and opus_free for dnn and DRED related functions
This commit is contained in:
parent
f5a1efdc17
commit
12fbd8111a
10 changed files with 31 additions and 21 deletions
|
@ -205,7 +205,7 @@ int lpcnet_load_model(LPCNetState *st, const unsigned char *data, int len) {
|
|||
int ret;
|
||||
parse_weights(&list, data, len);
|
||||
ret = init_lpcnet_model(&st->model, list);
|
||||
free(list);
|
||||
opus_free(list);
|
||||
if (ret == 0) return 0;
|
||||
else return -1;
|
||||
}
|
||||
|
@ -214,14 +214,15 @@ int lpcnet_load_model(LPCNetState *st, const unsigned char *data, int len) {
|
|||
LPCNetState *lpcnet_create()
|
||||
{
|
||||
LPCNetState *lpcnet;
|
||||
lpcnet = (LPCNetState *)calloc(lpcnet_get_size(), 1);
|
||||
lpcnet = (LPCNetState *)opus_alloc(lpcnet_get_size(), 1);
|
||||
OPUS_CLEAR(lpcnet, 1);
|
||||
lpcnet_init(lpcnet);
|
||||
return lpcnet;
|
||||
}
|
||||
|
||||
void lpcnet_destroy(LPCNetState *lpcnet)
|
||||
{
|
||||
free(lpcnet);
|
||||
opus_free(lpcnet);
|
||||
}
|
||||
|
||||
void lpcnet_reset_signal(LPCNetState *lpcnet)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue